Skip to content

Instantly share code, notes, and snippets.

@kusold
Created November 14, 2011 22:38
Show Gist options
  • Select an option

  • Save kusold/1365446 to your computer and use it in GitHub Desktop.

Select an option

Save kusold/1365446 to your computer and use it in GitHub Desktop.
Quick implementation of FizzBuzz in Python
i = 1
while ( i < 100):
string = ""
if (i%3 == 0):
string += "Fizz"
if (i%5 == 0):
string += "Buzz"
if string == "":
string = str(i)
string += ", "
print string
i += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment