while True :
Vehicle_Number_PLate = ('Please enter the vehicles number plate: ')
If len(Vehicle_Number_Plate)>7:
print ('The number plate is invalid, please try again')
Vehicle_Number_plate = FALSE
If len(Vehicle_Number_Plate)<7:
print ('The number plate is invalid, please try again')
你能帮我一下吗,我真的被困了,我需要帮助。非常感谢
就像注释中提到的
If
应该是if
,而FALSE
应该是False
。要获取用户输入,请使用input('Please enter the vehicles number plate: ')
。您需要适当的缩进,并且您的变量与if
中的变量不匹配。我相信这就是你想要的:相关问题 更多 >
编程相关推荐