Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 1 . Ask the user to input 3 valuse for a loan. The amount of the loan, the interest for the loan and the

Python
1. Ask the user to input 3 valuse for a loan. The amount of the loan, the interest for the loan and the number of years for the loan.
2. Show a calculation that takes the amount, interest, and the years to calculate the total value of the loan.
3. Use a loop starting from year 1 and going up to the year that was input by the user to calculate the total value of the loan for that year.
4. Print the year and the loan amount formatted to 2 decimal places.
def greeting():
print("Greetings to you, please fill out this loan application")
def thankyou():
print("Thank you for your loan application")
greeting()
def main():
for i in range(1,11):
print(i)
amount = float(input("Please enter the loan amount: "))
interest = float(input("Please enter the interest rate: "))
years = int(input("Please enter years of the loan: "))
print("You entered", amount)
print(f"This is the loan {amount:.2f} approximate")
total = amount *(1+ interest)**10
thankyou()
main()

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

More Books

Students also viewed these Databases questions