So as I'm trying to improve my calculator program after every result I ask the user if they would like to use the calculator. Now I've created a condition if they say Y it would repeat the process. However at the bottom I added != "N" for any other respose other than Y or N. Outside the following code I provided there is another while loop which takes the response of N and stops the program.
But my question is, for the last elif condition, how can I create a loop where if the user doesn't type either Y or N it would keep asking again? I tried continue but that would start the whole program (the loop outside the code I provided.)
if operator == "Multiply":
multiply = number_One * number_Two
print("Answer:", multiply)
restart = input("Would you like to continue (Y/N)? ")
if restart == "Y":
continue
elif restart != "N":
print(
"That's not one of the options. Please type in Y for (Yes) or N for (No)"
)```