Oct-11-2020, 01:25 PM
Basic question but I`m doing something wrong. When run (windows idle 3.8) I receieve name 'a' is not defined. Thanks for help.
def instalment(a,b,c):
return (a*(b/100/12))/(1-(1+(b/100/12)**-c))
a = int(input("loan amount:"))
b = int(input("annual interest rate:"))
c = int(input("repayment period in months:"))
print("Monthly instalment equals to:", instalment(a,b,c))
def instalment(a,b,c):
return (a*(b/100/12))/(1-(1+(b/100/12)**-c))
a = int(input("loan amount:"))
b = int(input("annual interest rate:"))
c = int(input("repayment period in months:"))
print("Monthly instalment equals to:", instalment(a,b,c))