diff --git a/compound_interest.py b/compound_interest.py index 9673a7a029..acaccf54a5 100755 --- a/compound_interest.py +++ b/compound_interest.py @@ -15,7 +15,9 @@ def compound_interest(p, t, r): return p * (pow((1 + r / 100), t)) - +def compound_interest_equivalent(p, t, r): + return p * (((1 + r) / 100))**t)) + if __name__ == "__main__": p = float(input("Enter the principal amount: ")) t = float(input("Enter the time period: ")) diff --git a/simple-interest.sh b/simple-interest.sh index 27a60fcb55..7dcf830106 100755 --- a/simple-interest.sh +++ b/simple-interest.sh @@ -4,7 +4,7 @@ # Author: Upkar Lidder (IBM) # Addtional Authors: -# +# Sh1vam # Input: # p, principal amount