We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 67d5bfb + 7ef964c commit 64210dcCopy full SHA for 64210dc
emi-calculator.py
@@ -0,0 +1,20 @@
1
+def emi_calculator(p:float, r:float, t:float):
2
+ """EMI Calculator for one months
3
+ --------------------------------
4
+ Parameters:
5
+ p - principal
6
+ r - interest rate per month
7
+ t - time period (in years)
8
+ """
9
+ r = r / (12 * 100) # one month interest
10
+ t = t * 12 # one month period
11
+ emi = (p * r * pow(1 + r, t)) / (pow(1 + r, t) - 1)
12
+ return emi
13
+
14
15
+principal = float(input("Enter principal amount (in ₹):"))
16
+rate = float(input("Enter Interest Rate per month (%):"))
17
+time = float(input("Enter Time period (in years):"))
18
+emi = emi_calculator(principal, rate, time)
19
+print("Your Monthly EMI is ₹", round(emi,2))
20
0 commit comments