Computer Science, asked by nitaysu205, 4 months ago

Write a python program to calculate simple interest for n years depending on condition that rate is 5 % if amount is less than 20000 otherwise rate as 12 % ​

Answers

Answered by anindyaadhikari13
2

Correct Question:-

  • Write a python program to calculate simple interest for n years depending on condition that rate is 5 % if principal is less than 20000 otherwise rate as 12 % 

Program:-

p=float(input("Enter principal amount: "))

r=0

if (p<20000):

r=5

else:

r=12

t=float(input("Enter time in years: "))

si=p*r*t/100

print("Simple Interest Earned is: ",si)

Similar questions