some_fizzbuzz_answers_i_guess/fizzbuzz.py

12 lines
223 B
Python
Raw Normal View History

2021-04-04 22:23:42 +00:00
buzzes = {3: "Fizz", 5: "Buzz"}
for i in range(1, 101):
output = ""
for j in buzzes:
if i % j == 0:
output += buzzes[j]
if len(output) == 0:
print(i)
else:
print(output)