Created
May 17, 2016 13:58
-
-
Save broschke/417c6d9713e3c59530e9b3549103f0eb to your computer and use it in GitHub Desktop.
bernardo-fizzbuzz assignment
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
n = raw_input("Upper limit: ") | |
n = int(n) | |
for i in range(1,n): | |
if i % 3 == 0 and i % 5 == 0: | |
print 'fizz buzz' | |
elif i % 5 == 0: | |
print 'buzz' | |
elif i % 3 == 0: | |
print 'fizz' | |
else: | |
print i | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment