Skip to content

Instantly share code, notes, and snippets.

@tjguk tjguk/fizz.py
Created Oct 21, 2018

Embed
What would you like to do?
fizz = 5
buzz = 7
counter = 1
while counter <= 60:
fizz_num = counter % fizz
buzz_num = counter % buzz
if fizz_num == 0:
print("Fizz")
elif buzz_num == 0:
print("Buzz")
else:
print(counter)
counter += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.