why this code is not working can someone help me im a begginer
Question:
hi can someone help me with this code idk what im doing wrong im a begginer in python
while True:
command = input("> ").lower
if command == "start":
print("lets go")
elif command == "stop":
print('why not')
elif command == 'help':
print("""
start---to start the car
stop--- to stop the car
quit--- to finish the game
""")
elif command == "quit":
break
else:
print("i dont understand")
Answers:
i did a little edite to your code
while True:
command = input("> ").lower()
if command == "start":
print("lets go")
elif command == "stop":
print('why not')
elif command == 'help':
print("""
start---to start the car
stop--- to stop the car
quit--- to finish the game
""")
elif command == "quit":
break
else:
print("i dont understand")
Just a syntax issue
while True:
command = input("> ")
command = command.lower()
if command == "start":
print("lets go")
elif command == "stop":
print("why not")
elif command == "help":
print('''
start---to start the car
stop--- to stop the car
quit--- to finish the game
''')
elif command == "quit":
break
else:
print("i dont understand")
hi can someone help me with this code idk what im doing wrong im a begginer in python
while True:
command = input("> ").lower
if command == "start":
print("lets go")
elif command == "stop":
print('why not')
elif command == 'help':
print("""
start---to start the car
stop--- to stop the car
quit--- to finish the game
""")
elif command == "quit":
break
else:
print("i dont understand")
i did a little edite to your code
while True:
command = input("> ").lower()
if command == "start":
print("lets go")
elif command == "stop":
print('why not')
elif command == 'help':
print("""
start---to start the car
stop--- to stop the car
quit--- to finish the game
""")
elif command == "quit":
break
else:
print("i dont understand")
Just a syntax issue
while True:
command = input("> ")
command = command.lower()
if command == "start":
print("lets go")
elif command == "stop":
print("why not")
elif command == "help":
print('''
start---to start the car
stop--- to stop the car
quit--- to finish the game
''')
elif command == "quit":
break
else:
print("i dont understand")