Skip to content
Advertisement

play as many sounds as loop count in python

I want the alarm.play() function to repeat for the number of loops and ring 10 times as in the example, but it just keeps ringing once every time I try or change it. How can I fix this? And does it make more sense to use for instead of while ?

JavaScript

Advertisement

Answer

just stop the alarm at the end of loop and befor stop it create loop for stop executing while the sound is playing

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement