diff --git a/2hp.py b/2hp.py new file mode 100644 index 0000000..435ce7f --- /dev/null +++ b/2hp.py @@ -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.