Loop and Flag exercise
Tire_Pressure;
input Idle_Rpm;
maintenance = False
while maintenance != True:
if Tire_Pressure < 20:
print "Tire pressure too low!!"
// using flag to check this condition
if Idle_Rpm < 500:
print "Idle RPM too low!!"
// using flag to check this condition
print "This car needs maintenance!!"Last updated
Was this helpful?