Skip to content

Instantly share code, notes, and snippets.

@yasuda0320
Created July 4, 2020 00:54
Show Gist options
  • Save yasuda0320/0b01d86f7b370daa4601f1aa7acc2a6d to your computer and use it in GitHub Desktop.
Save yasuda0320/0b01d86f7b370daa4601f1aa7acc2a6d to your computer and use it in GitHub Desktop.
def fb(n):
fizz = ''
if n % 3 == 0:
fizz = 'Fizz'
buzz = ''
if n % 5 == 0:
buzz = 'Buzz'
return fizz + buzz
i = 1
while i <= 20:
print(i, fb(i))
i = i + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment