Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions 2hp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Python3 program to find compound
# interest for given values.

def compound_interest(principle, rate, time):

# Calculates compound interest
Amount = principle * (pow((1 + rate / 100), time))
CI = Amount - principle
print("Compound interest is", CI)

# Driver Code
compound_interest(10000, 10.25, 5)

# This code is contributed by Abhishek Agrawal.