0

After running my process, I would like to ask if the user whether want to continue or not. I let them input y/n but I have no idea what if they don't type y or n.

while True:

    ss = int(input("Insert second: "))
    h = ss // (60*60)
    m = (ss - h*(60*60))//60

    print("--->", h, "H ", m, "m")

    print("Would you like another one? y/n: ")
    yn = input()

    if "y" == str.lower(yn):
        continue

    elif "n" == str.lower(yn):
        print("Thanks for using !!!")

        break
not_speshal
  • 20,086
  • 2
  • 13
  • 28

0 Answers0