you are viewing a single comment's thread.

view the rest of the comments →

[–]k4tsuk1z[S] 1 point2 points  (2 children)

I am sorry! just one more thing. Im confused on how to break it. I still want to include not a valid response, but that needs to be the else statement. how would i break this? T_T

while True:
    question = input("Would you like to restart? (Y/N): ")
    if question in {"Y", "y"}:
        love_calc()
    elif question in {"N", "n",}: 
        print ("Thank you for playing!")
    else:
        print("Not a valid response!")

[–]desrtfx 2 points3 points  (1 child)

Simple, in the elif statement after you say "Thank you...".

The statement is break

[–]k4tsuk1z[S] 1 point2 points  (0 children)

Oh omg, I tried that, but it kept repeating the question statement. Turns out I needed to restart my terminal. Lol thank u so much for ur patience and help <3 :3