Created
June 9, 2016 23:22
-
-
Save death667b/962cd746e4a2d206bf2ca29398b7c102 to your computer and use it in GitHub Desktop.
FizzBuzz in Python
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
for x in range (1, 101): | |
if ((x % 3) == 0) and ((x % 5) == 0): | |
print "FizzBuzz" | |
elif ((x % 3) == 0): | |
print "Fizz" | |
elif ((x % 5) == 0): | |
print "Buzz" | |
else: | |
print x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment