Using Range Function
- by Michael Alexander Riechmann
My goal is to make a program that takes an input (Battery_Capacity) and ultimately spits out a list of the (New_Battery_Capacity) and the Number of (Cycle) it takes for it ultimately to reach maximum capacity of 80.
Cycle = range (160)
Charger_Rate = 0.5 * Cycle
Battery_Capacity = float(raw_input("Enter Current Capacity:"))
New_Battery_Capacity = Battery_Capacity + Charger_Rate
if Battery_Capacity < 0:
print 'Battery Reading Malfunction (Negative Reading)'
elif Battery_Capacity > 80:
print 'Battery Reading Malfunction (Overcharged)'
elif float(Battery_Capacity) % 0.5 !=0:
print 'Battery Malfunction (Charges Only 0.5 Interval)'
while Battery_Capacity >= 0 and Battery_Capacity < 80:
print New_Battery_Capacity
I was wondering why my Cycle = range(160) isn't working in my program?