algorithms/fizzbuzz/fizzbuzz.py

13 lines
206 B
Python
Raw Normal View History

2024-01-12 09:36:47 -05:00
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