SHARE
TWEET

Untitled

a guest Jun 26th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def fb(n):
  2.     if n % 3 == 0:
  3.         ret = "Fizz"
  4.     elif n % 5 == 0:
  5.         ret = "Buzz"
  6.     elif n % 15 == 0:
  7.         ret = "FizzBuzz"
  8.     else:
  9.         ret = ""
  10.     return ret
  11.  
  12. i = 1
  13. while i <= 20:
  14.     print(i, fb(i))
  15.     i = i + 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top