Skip to content

Commit b8f8cbd

Browse files
ManOfDiamondtechyminati
authored andcommitted
compound interest calculator
1 parent 5d44e54 commit b8f8cbd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎compound_interest.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
print("Compound Interest Calculator (yearly)")
2+
p = int(input("Enter the principal amount: "))
3+
r = float(input("Enter the rate of interest per year (%): "))
4+
n = float(input("Enter time period (years): "))
5+
ci = p * ((1+r/100) ** n)
6+
print("Compound Interest:", round(ci, 2))

0 commit comments

Comments
 (0)