algorithms/fizzbuzz/fizzbuzz.py
2024-01-12 09:36:47 -05:00

12 lines
206 B
Python

i = 1
while i <= 30:
if i % 5 == 0 and i % 3 == 0:
print('fizzbuzz')
elif i % 3 == 0:
print('fizz')
elif i % 5 == 0:
print('buzz')
else:
print(i)
i +=1