Skip to content

Commit 075af4e

Browse files
authored
calculate simple interest
A Python program to find simple interest for given principal amount, time and rate of interest.
1 parent 31fef52 commit 075af4e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

simple interest

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Python3 program to find simple interest
2+
# for given principal amount, time and
3+
# rate of interest.
4+
5+
6+
def simple_interest(p,t,r):
7+
print('The principal is', p)
8+
print('The time period is', t)
9+
print('The rate of interest is',r)
10+
11+
si = (p * t * r)/100
12+
13+
print('The Simple Interest is', si)
14+
return si
15+
16+
# Driver code
17+
simple_interest(1000, 2, 5)

0 commit comments

Comments
 (0)