Skip to content

Instantly share code, notes, and snippets.

@stoddart
Created August 3, 2012 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stoddart/3250796 to your computer and use it in GitHub Desktop.
Save stoddart/3250796 to your computer and use it in GitHub Desktop.
Fizzbuzz in Python
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