Question
>>> principal = float(input(Total loan amount to be taken: )) interest_rate_of_loan = float(input(Annual interest rate applied: )) timespan = int(input(Duration of Loan in years:)) def
>>> principal = float(input("Total loan amount to be taken: "))
interest_rate_of_loan = float(input("Annual interest rate applied: "))
timespan = int(input("Duration of Loan in years:"))
def monthly_pay(principal,interest_rate_of_loan,timespan):
n = timespan*12
r = interest_rate_of_loan/(100*12)
monthly_payment = principal*(r/(1-(1/((1+r)**n))))
return monthly_payment
permonth = monthly_pay(principal,interest_rate_of_loan,timespan)
print("Monthly payment: ",float(round(permonth,2)))
print("Total Payment", float(round(permonth*timespan*12,2))) SyntaxError: multiple statements found while compiling a single statement >>>
Why is there a SyntaxError and can someone please fix it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started