Skip to content

Instantly share code, notes, and snippets.

@tjguk
Created October 21, 2018 10:02
Show Gist options
  • Save tjguk/61bd3e38c56fb5e1467381e5a9aa117e to your computer and use it in GitHub Desktop.
Save tjguk/61bd3e38c56fb5e1467381e5a9aa117e to your computer and use it in GitHub Desktop.
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