Add 'Q' for quit.
while True: P1 = input("Convert to C,F (select one), 'Q'=quit: ") print (P1) if P1.lower() == "c": # str.lower() ensure that it won't miss the upper case 'C' Temp = int(input("What is your temperature?")) print((Temp * (9/5)) + 32) elif P1.lower() == "f": Temp = int(input("What is your temperature?")) print((Temp - 32) * (5/9)) elif P1.lower() == 'q': break