Created
May 14, 2021 14:24
-
-
Save Zishan-Rahman/3a78ff268888f29633369fcccac5dccf to your computer and use it in GitHub Desktop.
I wrote FizzBuzz in Python because why not?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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