Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. def fizz():
  2. return "Fizz"
  3.  
  4. def buzz():
  5. return "Buzz"
  6.  
  7. i = 1
  8. for i in range(1,101):
  9. if i % 15 == 0:
  10. print(fizz() + buzz())
  11. elif i % 3 == 0:
  12. print(fizz())
  13. elif i % 5 == 0:
  14. print(buzz())
  15. else:
  16. print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement