Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. def fb(n):
  2. if n % 5 == 0 and n % 3 == 0:
  3. return "FizzBuzz"
  4. elif n % 3 == 0:
  5. return "Fizz"
  6. elif n % 5 == 0:
  7. return "Buzz"
  8. else:
  9. return " "
  10.  
  11. i=1
  12. while i <= 20:
  13. print(i, fb(i))
  14. i+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement