CBSE Class 11 Computer Science Question 172 of 173

Data Handling — Question 24

Back to all questions
24
Question

Question 24

Write a program to calculate amount payable after compound interest.

Solution
p = float(input("Enter principal: "))
r = float(input("Enter rate: "))
t = float(input("Enter time: "))

amt = p * (1 + r / 100) ** t

print("Amount Payable =", amt)
Output
Enter principal: 15217.75
Enter rate: 9.2
Enter time: 3
Amount Payable = 19816.107987312007
Answer