-1
print_list=input("Do you wish to print list \n:")
if print_list == "yes":
for item in List:
print (item , "%2.f" %(Speed),"m/s")
elif print_list == "no":
print ("Thank you")
if print_list != "yes" or "no":
while True:
print ("Invalid Input")
break
これは何が起こったかである:条件が満たされていないプログラムをループする
Do you wish to print list
:hhh
Invalid Input
Press "Enter Key" when the vehicle passes Sensor 1
:
は、私は何を期待していたことは質問をするためのプログラムのためだったときに、「あなたは、リストを印刷しますか」ユーザー入力が無効です。
while True: 'は繰り返したいすべてのコードを囲む必要があります –