Where's my charger?!

Task 2: 


The program needed the user to input how much charge they have left in their phone and whether they will need their charger or not.If the charge was 5% or less they needed "Connect your charger!" and if above that "All good." This involved using a variable and putting the variable in if  and using else for anything above that. 
Charge = int(input("Remaining Charge:"))
x = 5
if Charge <=5:
  print("Connect your charger!")
else:
    print("All good.")

What I find frustrating is always forgetting the punctuation, like the full stop after the all good. Other than that the coding was alright to program after reading the information given.

No comments:

Post a Comment