Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Why am I getting a syntax error at the TotalPayment line? python?
LoanAmount = eval(input("Enter loan amount: "))
Years = eval(input("Enter the number of years: "))
Months = Years * 12
rate = 5.0
for rate in range(5.0, 8.125):
MonthlyPayment = ((rate) * (LoanAmount)) / ((1 - ((1 + rate/100) ** Months))
TotalPayment = MonthlyPayment * Months
rate += (1/8)
print(MonthlyPayment)
print(TotalPayment)
1 Answer
- ChrisLv 74 years ago
You are missing a closing bracket in the line before.
Found a few other problems: http://ideone.com/098WQs