Created
January 1, 2016 15:53
-
-
Save pcote/d6f22185edfb7dfbc64d to your computer and use it in GitHub Desktop.
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 fizzbuzz1(max_num): | |
| for num in range(1, max_num+1): | |
| msg = "" | |
| if num % 3 == 0: | |
| msg += "fizz" | |
| if num % 5 == 0: | |
| msg += "buzz" | |
| print("{}: {}".format(num, msg)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment