Skip to content

Instantly share code, notes, and snippets.

@tjguk
Created October 21, 2018 10:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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