runtime
35 / 500
question 35 Conditional Logic · easy

A battery indicator

A phone shows one battery message. While it is charging it always says Charging. Otherwise it says Charge now at 10% or below, Low at 25% or below, and OK above that. Replace each ??? with a test.

First linesbattery = 18 and charging = False. Check runs your program again with other readings
PrintsLow
Expected output1 line
  1. 1Low

Loading your progress…

A battery indicator — Python practice · Runtime