Answered step by step
Verified Expert Solution
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...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