Skip to content

Commit 6787d92

Browse files
author
ReemNaw
committed
add prints
1 parent 83026bb commit 6787d92

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compound_interest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@
1313

1414

1515
def compound_interest(p, t, r):
16+
1617
return p * (pow((1 + r / 100), t))
1718

1819

1920
if __name__ == "__main__":
2021
p = float(input("Enter the principal amount: "))
22+
print(f'P: {p}')
23+
2124
t = float(input("Enter the time period: "))
25+
print(f'T: {t}')
26+
2227
r = float(input("Enter the rate of interest: "))
28+
print(f'R: {r}')
2329

2430
print("The compound interest is {:.2f}".format(compound_interest(p, t, r)))

0 commit comments

Comments
 (0)