import winsound
import time
import keyboard

def alarm():
    while True:
        winsound.Beep(660, 1000)
        time.sleep(1)

while True:
    if keyboard.is_pressed('a'):
        alarm()
    elif keyboard.is_pressed('b'):
        alarm()
    elif keyboard.is_pressed('c'):
        alarm()
    elif keyboard.is_pressed('d'):
        alarm()
    elif keyboard.is_pressed('e'):
        alarm()
    elif keyboard.is_pressed('f'):
        alarm()
    elif keyboard.is_pressed('g'):
        alarm()
    elif keyboard.is_pressed('h'):
        alarm()
    elif keyboard.is_pressed('i'):
        alarm()
    elif keyboard.is_pressed('j'):
        alarm()
    elif keyboard.is_pressed('k'):
        alarm()
    elif keyboard.is_pressed('l'):
        alarm()
    elif keyboard.is_pressed('m'):
        alarm()
    elif keyboard.is_pressed('n'):
        alarm()
    elif keyboard.is_pressed('o'):
        alarm()
    elif keyboard.is_pressed('p'):
        alarm()
    elif keyboard.is_pressed('q'):
        alarm()
    elif keyboard.is_pressed('r'):
        alarm()
    elif keyboard.is_pressed('s'):
        alarm()
    elif keyboard.is_pressed('t'):
        alarm()
    elif keyboard.is_pressed('u'):
        alarm()
    elif keyboard.is_pressed('v'):
        alarm()
    elif keyboard.is_pressed('w'):
        alarm()
    elif keyboard.is_pressed('x'):
        alarm()
    elif keyboard.is_pressed('y'):
        alarm()
    elif keyboard.is_pressed('z'):
        alarm()
    elif keyboard.is_pressed('1'):
        alarm()
    elif keyboard.is_pressed('2'):
        alarm()
    elif keyboard.is_pressed('3'):
        alarm()
    elif keyboard.is_pressed('4'):
        alarm()
    elif keyboard.is_pressed('5'):
        alarm()
    elif keyboard.is_pressed('6'):
        alarm()
    elif keyboard.is_pressed('7'):
        alarm()
    elif keyboard.is_pressed('8'):
        alarm()
    elif keyboard.is_pressed('9'):
        alarm()
    elif keyboard.is_pressed('0'):
        alarm()
    time.sleep(1)