livepython.net

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

Learn this firstChapter 5 · Python Numbers: int, float and Math Operators
solution.py
# write your code here

EXPECTED OUTPUT

1Simple interest: 100.00
2Total amount: 1100.00

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.