| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff 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) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments