Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def FizzBuzz(number):
- from time import sleep
- from winsound import Beep
- counter = 0
- while counter < number:
- counter += 1
- if counter % 5 == 0 and counter % 3 == 0:
- print("FizzBuzz")
- Beep(4000, 250)
- elif counter % 5 == 0:
- print("Fizz")
- Beep(2000, 250)
- elif counter % 3 == 0:
- print("Buzz")
- Beep(1000, 250)
- else:
- print(counter)
- sleep(0.25)
- FizzBuzz(100)
Advertisement
Add Comment
Please, Sign In to add comment