Skip to content

Instantly share code, notes, and snippets.

@broschke
Created May 17, 2016 13:58
Show Gist options
  • Save broschke/417c6d9713e3c59530e9b3549103f0eb to your computer and use it in GitHub Desktop.
Save broschke/417c6d9713e3c59530e9b3549103f0eb to your computer and use it in GitHub Desktop.
bernardo-fizzbuzz assignment
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