r/ProgrammerHumor • • Jan 16 '14

[deleted by user]

[removed]

1.3k Upvotes

446 comments sorted by

View all comments

0

u/PogOtter May 02 '14

Yay Python!

counter = 1 
while counter < 101:
    currentString = ""
    if counter%3 == 0:
        currentString = "Fizz"
    if counter%5 == 0:
        currentString += "Buzz"
    if currentString == "":
        print str(counter) +"\n"
    else:
        print currentString +"\n"
    counter += 1