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.")
No comments:
Post a Comment