I am building a small car simulator game. it's like a terminal window, I type start and it started normally. I press stop and it stops. Unfortunately, when I start it again, I had a error like this.
Traceback (most recent call last):
File "C:\Users\****\OneDrive\New folder\Car Emulator.py", line 12, in <module>
turtle.shape('square')
File "<string>", line 5, in shape
turtle.Terminator
I don't know what does this mean, because I called the turtle.bye() function. Although I Searched all the Stack Overflow forums just like that. the code is like this:
while True:
command = input(">").lower()
if command == "start":
if engine == False:
engine = True
print("Car started.")
t.shape('square')
else:
restart = input("Car already started. Restart? (Y) Yes (N) No ")
if restart.upper == "Y":
engine = False
t.bye()
engine = True
t.shape('turtle')
print("Car Restarted.")
elif command == "stop":
if engine == True:
engine = False
t.bye()
print("Car stopped.")
else:
print("Car already stopped.")
elif command == "help":
print('''
start - start the car
stop - stop the car
quit - exit
''')
elif command == "quit":
please someone explain this to me