jeudi 21 octobre 2021

Trying to create a program that tracks which inputs I've added but stuck

Basically I'm trying to get my program to loop back to main_screen after entering a screen_number, repeating indefinitely until I press T to terminate it. Meanwhile P is supposed to track how many numbers I've imputed throughout the session. This is what I have so far and I only know how to loop screen_number. Just can't figure out how to loop back to main_screen or how to go about making the "P" function.

main_screen = str(input("Pick W to add a new number, P to show how many numbers, high or low, have been added, or T to terminate: "))
if(main_screen == "W"):
    screen_number = int(input("Input your grade: "))    
    if(screen_number >= 10):
        print("It's high.")
    elif(user_grade < 10):
        print("It's low.")
if(user_menu == "T"):
    print("Terminating system.")
else:
    print("Invalid.")```

Aucun commentaire:

Enregistrer un commentaire