def payment(a,r,m): m = m/100 p = (r*a)/(1-(1/(1+r)**(m))) return p a = int(input("Enter the amount of the loan: ")) r = float(input("Enter the interest rate: ")) m = int(input("Number of months: ")) print("Payment amounth per month : ", payment(a,r,m))