Car game - struggling to understand one of the if statements

As in the picture, the boolean “started” with the default as false, which means that the car has not been started yet. As my logic goes, “if started” means the car has not been started according to the preset variable “started=false”, why would Mosh type after that “print(‘Car is already started’)”
Can anyone explain this to me why this happens?

Another question:
What’s the relations between the 6-hour long python video Mosh posted on youtube and the 12-hour python course on Mosh’s website?

You reasoning is correct when the execution first enters the while loop. However, take into account that the loop keeps executing indefinitely, then consider:

  • What happens when the user enters the command “start” for the first time.
  • What happens afterwards, once started is True and the user types in start again.
1 Like

Thank you for the answer, I think I got it now. Appreciate your help