Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

>>> 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions