Simple Interest
Programs with input · Beginner · about 5 min
Riya keeps some money in a bank for a few years. Read the principal (the money put in), the rate of interest per year as a percent, and the time in years, one per line. Any of them may have decimals.
Simple interest is principal * rate * time / 100. Print it, then the amount at the end (the principal plus the interest), each with 2 decimal places, as Simple interest: 1200.00 and Amount: 11200.00.
The prompts inside input() are not checked, only what you print.
Example
You type:
10000 6 2
The program prints:
Simple interest: 1200.00 Amount: 11200.00
principal = float(input("Principal: "))
# Read the rate and the time, then print the interest and the amount
The solution opens after your first Check.