Hi, I'm dw0391
I have an issue with a class task that my teacher can't seem to fix.
We were asked to write the code for a 'no interest loan repayment
calculator'. I tried, but it did not work.
Attached is the relevant file, 'Prog 6'
Could you please tell me what I am doing wrong?
Thanks.
# No Interest Loan Repayment Calculator
# How to work out how much a person will need to pay per month:

print (

"""

Loan Repayment Calculator

This programs calculates how much you need
to pay each month to pay off a loan,
because maths hurts your head:

"""

)

def payrate(loantotal, timetotal):
    rate = loantotal / timetotal
    return rate

def main():
    loantotal = float(input("Total of Loan: $"))
    timetotal = float(input("Time Provided (in months):"))

    rate = payrate(loantotal, timetotal) 

print ("You need to pay:"% rate, "each month")

main()

input("\n\nPlease Press the Enter key to Exit.")
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to