147k views
14 votes
Write a program code in the python programming language to find simple interest given the

formula SI = (P*R*T)/100.
Read P(Principal), R (Rate), T (Time) from the keyboard and Calculate Simple Interest (SI).

User SuperDJ
by
6.2k points

1 Answer

1 vote

Answer:

p = float(input('Principal: '))

r = float(input('Rate: '))

t = float(input('Time: '))

si = (p * r * t) / 100

print(si)

The "float" before the input in the first 3 lines is so you're able to input decimals. If you're not using decimals, you can switch the "float" to "int". However, if you input a decimal number after you switched to int, you will receive an error

User AntiMatterDynamite
by
6.5k points