Created
August 1, 2017 01:07
-
-
Save IanCarrasco/e18ba6f3353d10adc66d079f131cc38e to your computer and use it in GitHub Desktop.
Fizzbuzz Python Implementation
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(amt): | |
for i in xrange(1,amt): | |
if i % 3 == 0 and i % 5 == 0: | |
print "fizzbuzz" | |
elif i % 3 is 0: | |
print "fizz" | |
elif i % 5 is 0: | |
print "buzz" | |
else: | |
print i | |
fizzBuzz(100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment