Friday, May 10, 2019

WAP to input principle, rate and time from the user and calculate the simple interest and total amount. Display all the values

Principle = float(input('Enter principle amount = '))
Rate = float(input('Enter rate(%) = '))
Time = float(input('Enter time = '))
#A = P(1 + rt)
print('-'*10)
print('principle amount = ' + str(Principle))
print('rate = ' + str(Rate))
print('time = ' + str(Time))
print('amount = ' + str(Principle * (1 + ((Rate / 100) * Time ) )))

No comments:

Post a Comment