Created
August 16, 2021 16:36
-
-
Save ArthurDeveloper/a59b17ab57c95dae420a2d3f6c2f5355 to your computer and use it in GitHub Desktop.
FizzBuzz in python
This file contains hidden or 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
def fizzbuzz(firstNumber, lastNumber): | |
for number in range(firstNumber, lastNumber+1): | |
if number % 3 == 0 and number % 5 == 0: | |
print("FizzBuzz") | |
elif number % 3 == 0: | |
print("Fizz") | |
elif number % 5 == 0: | |
print("Buzz") | |
fizzbuzz(1, 100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment