car_started = False
car_stopped = False
car_command = (“”)
while car_command != (“quit”):
car_command = input(“>”).upper()
if car_command == “START”:
if car_started == True:
print(“The car has already started”)
else:
print(“The car has started”)
car_started == True
elif car_command == “STOP”:
if car_stopped == True:
print(“the car has already stopped”)
else:
print(“The car has stopped”)
car_stopped = True
elif car_command == “HELP”:
print(“””
start – to start the car
stop – to stop the car
quit – to quit
“””)
elif car_command == “QUIT”:
break
else:
print(“I don’t understand”)
print(“done”)
Above is the full code. This is a simple game that allows the player to
stop or start the car, quit the game or quiry help. After modifications
to prevent starting a running car or stopping a stopped car an error appeared.
Line 20 has a red ‘(‘ parenthesis. I no longer have the run drop down menu.
I see the DEBUG CONSOLE but it is not very intuitive. Any help will be
greatly appreciated. (I have a sneaky suspicion that one character was
accidentally typed in the coding area.) Thank you.
submitted by /u/Character_Cat_1067
[link] [comments]
r/learnpython car_started = False car_stopped = False car_command = (“”) while car_command != (“quit”): car_command = input(“>”).upper() if car_command == “START”: if car_started == True: print(“The car has already started”) else: print(“The car has started”) car_started == True elif car_command == “STOP”: if car_stopped == True: print(“the car has already stopped”) else: print(“The car has stopped”) car_stopped = True elif car_command == “HELP”: print(“”” start – to start the car stop – to stop the car quit – to quit “””) elif car_command == “QUIT”: break else: print(“I don’t understand”) print(“done”) Above is the full code. This is a simple game that allows the player to stop or start the car, quit the game or quiry help. After modifications to prevent starting a running car or stopping a stopped car an error appeared. Line 20 has a red ‘(‘ parenthesis. I no longer have the run drop down menu. I see the DEBUG CONSOLE but it is not very intuitive. Any help will be greatly appreciated. (I have a sneaky suspicion that one character was accidentally typed in the coding area.) Thank you. submitted by /u/Character_Cat_1067 [link] [comments]
car_started = False
car_stopped = False
car_command = (“”)
while car_command != (“quit”):
car_command = input(“>”).upper()
if car_command == “START”:
if car_started == True:
print(“The car has already started”)
else:
print(“The car has started”)
car_started == True
elif car_command == “STOP”:
if car_stopped == True:
print(“the car has already stopped”)
else:
print(“The car has stopped”)
car_stopped = True
elif car_command == “HELP”:
print(“””
start – to start the car
stop – to stop the car
quit – to quit
“””)
elif car_command == “QUIT”:
break
else:
print(“I don’t understand”)
print(“done”)
Above is the full code. This is a simple game that allows the player to
stop or start the car, quit the game or quiry help. After modifications
to prevent starting a running car or stopping a stopped car an error appeared.
Line 20 has a red ‘(‘ parenthesis. I no longer have the run drop down menu.
I see the DEBUG CONSOLE but it is not very intuitive. Any help will be
greatly appreciated. (I have a sneaky suspicion that one character was
accidentally typed in the coding area.) Thank you.
submitted by /u/Character_Cat_1067
[link] [comments]