import time
repeat=0
price=0
print("Welcome to McDonald's self order system")
time.sleep(0.5)
name_person=str(input("\nPlease enter your name to continue: "))
while True:
order=int(input("\n---Menu---\n 1.Burger\n 2.McPuff\n 3.Ice Cream\n 4.Cold Drink\n\nPlease order by typing the number: "))
if order in range(1,4) :
repeat=str(input("Do you want to order more? Yes/No: "))
if repeat == "No" or "no":
print("Ok")
break
else :
print("\n!!Invalid input!!")
time.sleep(0.5)
The or
command is not working when I am typing No
it shows Ok
that's normal but if I type Yes
it should loop but then also it's showing Ok
and when I am typing anything it's giving the output Ok
but if I am removing the or
its working perfectly.