Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A: Calculating total amount owed after graduation Use input() to set variables float variables loan per year and interest rate and int variable years.

 

A: Calculating total amount owed after graduation Use input() to set variables float variables loan per year and interest rate and int variable years. You will need two other variables: o total owed = 0 counter = 0_(This is a counter variable to count how many times the loop has been executed) som %3D Construct a while loop that calculates how much you will owe by graduation. Each year, you will add the loan per vear to your total owed and multiply by the interest rate The while loop will end when your counter is equal to your years. Example input: Number of years: 4 Loan amount per year: 4000 Interest rate (Ex. 0.045 for 4.5% annual): .05 Example output: Total Owed At Graduation $ 18102

Step by Step Solution

3.42 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

Here is your code years intinputNumber of years loanperyear fl... 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

Introduction to Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st edition

321321367, 978-0321321367

More Books

Students also viewed these Programming questions

Question

7.1 Describe the differences between the terms sex and gender.

Answered: 1 week ago