38. Python Program to Calculate Simple Interest
MediumNumbers
Overview
Use a formula with variables and format the answer.
Problem Statement
A principal of 1000 is saved at a rate of 5 per cent for 2 years. Store the three values in variables. Calculate the simple interest with principal * rate * time / 100, then the total amount (principal plus interest), and print both with two decimal places:
Simple interest: 100.00
Total amount: 1100.00
Input
No input is required for this question.
Output
Simple interest: 100.00
Total amount: 1100.00