Skip to content

Instantly share code, notes, and snippets.

@BekBrace
Created May 30, 2022 06:14
Show Gist options
  • Select an option

  • Save BekBrace/3290de96d804c54d8cacee812e867002 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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