Skip to content

Instantly share code, notes, and snippets.

@Zishan-Rahman
Created May 14, 2021 14:24
Show Gist options
  • Save Zishan-Rahman/3a78ff268888f29633369fcccac5dccf to your computer and use it in GitHub Desktop.
Save Zishan-Rahman/3a78ff268888f29633369fcccac5dccf to your computer and use it in GitHub Desktop.
I wrote FizzBuzz in Python because why not?
# FizzBuzz
def fizzbuzz(max):
for i in range(1,max+1):
string = ""
if i % 3 == 0:
string += "Fizz"
if i % 5 == 0:
string += "Buzz"
if not string.__contains__("z"):
string = i
print(string)
fizzbuzz(100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment