I am a newbie in python, trying to learn the coding. below a peace of code. need to understand what happens when the if statement starts
specifically... what happens on if started: command
command = ""
started = False
while True:
command = input(" > ").lower()
if command == "start":
if started:
print("car is already started")
else:
started = True
print("Car is started ... ")
Aucun commentaire:
Enregistrer un commentaire