hi i am new to python and the learning video had a challenge in it to make a monthly payment for a certain loan formula is M = L[i(1+i)n] / [(1+i)n-1]

M = monthly payment

L = loan amount

i = interest rate (if interest is 5%, then i =0.05

n = number of paymentsso my code was

L = input('loan amount ')

i = input('interest rate ')

n = input('number of payments ')Monthlypayment = L[i*i(1+i)] / [(1+i)*n-1]

print(Monthlypayment)

so there was an error called unsupported operand type(s) for +: 'int' and 'str'

please help!

Ask Your Question

Weekly Poll

Would you be willing to go on a SpaceX trip around the moon?

Discuss in The Lounge

Poll History