Skip to content

Instantly share code, notes, and snippets.

@BekBrace
Created May 30, 2022 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BekBrace/3290de96d804c54d8cacee812e867002 to your computer and use it in GitHub Desktop.
Save BekBrace/3290de96d804c54d8cacee812e867002 to your computer and use it in GitHub Desktop.
FizzBuzz in Python
for fizzbuzz in range(51):
if fizzbuzz % 3 == 0 and fizzbuzz % 5 == 0:
print("fizzbuzz")
continue
elif fizzbuzz % 3 == 0:
print("fizz")
continue
elif fizzbuzz % 5 == 0:
print("buzz")
continue
print(fizzbuzz)
@BekBrace
Copy link
Author

silly question that interviewers like to ask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment