Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. def fizz_buzz():
  2.  
  3. for num in range(1,101):
  4.  
  5. if num % 5 == 0 and num % 3 == 0:
  6. print("FizzBuzz")
  7. elif num % 3 == 0:
  8. print("Fizz")
  9. elif num % 5 == 0:
  10. print("Buzz")
  11. else:
  12. print(num)
  13.  
  14. fizz_buzz()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement