Created
June 15, 2019 01:01
-
-
Save youknowcast/6c8fbb181fe3523e9eb6e04965994e4b to your computer and use it in GitHub Desktop.
aiit_system_programming_vol02
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
def fb(n): | |
if n % 15 == 0: | |
return 'FizzBuzz' | |
elif n % 3 == 0: | |
return 'Fizz' | |
elif n % 5 == 0: | |
return 'Buzz' | |
else: | |
return '' | |
i = 1 | |
while i <= 20: | |
print(i, fb(i)) | |
i = i + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment