def Energy(initialEnergy, rate, time):
return rate * time + initialEnergy
print("Sample Input ")
initialEnergy = int(input("Enter initial energy:\t"))
rate = int(input("Enter the rate\t"))
time = int(input("Enter the time:\t"))
print("The energy is \t"+str(Energy(initialEnergy, rate, time)))
Comments
Leave a comment