Car Game
command=""
started=False
while True:
command = input('>').lower()
if command=='help':
print("""
start- to start the car
stop- to stop the car
quit- to exit
""")
elif command=='start':
if started:
print('car already started')
else:
started=True
print('Car started!')
elif command=='stop':
if not started:
print('Car already stopped')
else:
started=False
print('car stopped')
elif command=='quit':
break
else:
print('do not understand')
Comments
Post a Comment