16. Write a python program to calculate the total interest amount of the car loan. The borrow amount is 30,000 for 5 years with 3% interest rate.
The output is:
Borrow amount: 30 000
Years: 5
Interest rate: 3%
Expected Answer:
The total interest amount is 4500.0
Answer:
borrow_amount = 30000 interest_rate = 3.0 years = 5 interest_amount = (borrow_amount*(interest_rate/100))*years print("The total interest amount is", round(interest_amount, 2))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)