Make Your PC Sound in Python

Make Your PC Sound in Python

  • In this topic we learn how to write a code make your pc sound in python.

Source Code:

#Follow @Programmerfect

import winsound
frequency = 2500
duration = 1000
winsound.Beep(frequency, duration)
def sos():
    for i in range(0, 3):
        winsound.Beep(2000, 100)
        for i in range(0,3):
            winsound.Beep(2000, 400)
            for i in range(0,3):
                winsound.Beep(2000, 100)
sos()

Output:


Comments