Answer to Question #228834 in Python for Jayanth

Question #228834
A chemical produces a certain energy at a constant, rate for every second showing the amount of energy generated for every second for a period of time s.
Ex.intial energy=2
Rate=4
Time(secs)=3
1
Expert's answer
2021-08-23T13:39:49-0400
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)))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS