Skip to content

Instantly share code, notes, and snippets.

@uganikov
Created June 15, 2019 01:12
Show Gist options
  • Save uganikov/35ee3a62735db1d155e174dfa4195fb9 to your computer and use it in GitHub Desktop.
Save uganikov/35ee3a62735db1d155e174dfa4195fb9 to your computer and use it in GitHub Desktop.
FizzBuzz
def fb(n):
r = ""
if (n % 3 is 0):
r += "Fizz"
if (n % 5 is 0):
r += "Buzz"
return r
i = 1
while i <= 20:
print("%d %s" % (i, fb(i)))
i = i + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment