Exercises · Q11
Q.Write a Python program to calculate the amount payable if money has been lent on simple interest. Principal or money lent = P, Rate of interest = R% per annum and Time = T years. Then Simple Interest (SI) = (P x R x T)/ 100.
Amount payable = Principal + SI.
P, R and T are given as input to the program.
Uttarakhand UbseTextbookSubjective· 3mImportance★★★★★est
78% · 38/49 Questions
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →Read P, R, T as numbers, compute SI = (P × R × T)/100 and print amount = P + SI — for a sample input of P = 5000, R = 7.5, T = 2 the amount payable is 5750.0.
Another formula-to-program exercise. The pattern to internalise: take inputs → convert them to numeric types → translate the formula with correct precedence → print labelled results.
# Amount payable on simple interest
P = float(input("Enter principal (money lent): "))
R = float(input("Enter rate of interest (% per annum): "))
T = float(input("Enter time in years: "))
SI = (P * R * T) / 100 # Simple Interest
amount = P + SI # Amount payable
print("Simple Interest =", SI)
print("Amount payable =", amount)
Key lines:
- All three inputs go through
float()— rate and time are frequently fractional (7.5%, 2.5 years), andinput()alone would give strings, makingP * R * Ta TypeError. (P * R * T) / 100— the parentheses mirror the given formula; multiplication happens before the division by 100 either way, but writing it this way documents the intent.
Sample run (framed as an example — any inputs work):
Enter principal (money lent): 5000 …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.