I am trying to make a program where you can use the up and down arrow keys to increase a decrease a persons displayed heart rate.
import curses
running = True
heart_rate = 1
key = curses.KEY_RIGHT
print(heart_rate)
if key == curses.KEY_UP:
heart_rate += 1
print(heart_rate)
elif key == curses.KEY_DOWN:
heart_rate -= 1
print(heart_rate)
while heart_rate != 200:
if heart_rate == 200 or heart_rate == 0:
quit()
its just printing 1 and then not responding to the pressing of arrow keys.