Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

below is the supposed output. how could i fill this code out according to the given instructions Het up a blank list named loan_list loan_1ist

below is the supposed output. how could i fill this code out according to the given instructions image text in transcribed
image text in transcribed
image text in transcribed
Het up a blank list named loan_list loan_1ist =[1 Tiftialize a variable named year (not yearg) to 0 year =0 Start a loop to procesa each cash flow in the 21 st named cagh flowa declared above - Create a blank dictionary named annual_ontry_diot. Set the value corresponding to key named year to the variable named year. 2. This variable 18 initialiaed at 0 and incremented in this loop below. * For year o, beginning balance is of for other years beginning balance la previous ending balanee - else set the yalue corresponding to key named beginning balance to the variable named prior year's ending bal Set the value corresponding to key named interest_expenale to the produet, of beginning balance and rate Set the value corresponding to key named caah flow to cash.flow loop variable Set the value corresponding to key named ending balance - beginning balance t intereat expense . carh flor Append the annual entry diet to the loan list - inerement year by 1 ereate a blank loan_ligt net up a for loop to iterate ovor cash flowe while alra keeping track of the year Create a blank dietionary naned annual entry diet Set the yalwe corresponding to kty named year to the variable named yoar. Set the value corresponding to hey named interest_oxpense to the prodect of beginning balanich and rate F set the value correiponding to key named cash flow to canh flov loop variable - Set the value corresponding to key named ending butanen = betginning balance + intereat expenae + caah flovi Append the annual_entrydiet to the loan_liat print.(Ionn_1tat) [f year': 0 , 'beginning,balance': 0 , 'interest_expenne': 0.0, 'cash flow't 1000 , "ending balance' , 1000.0}, f 'year': 1, "beginning balance't 1000.0, 'Interedt_expenne': 38.56532275676727, 'cash flow': 200, 'eading.balance' i 838.56532 00 , 'ending balance' it 570.9048650815147), ' Year' : 3, 'beginning balance' : 570.9046650815147, . interest_expense'? 22. 017130385277287 , 'cash_flow' ' -150, 'ending balance' ' 442.92199546679194, , ' 'year' +4, 'beginning balance'' 442.92199 5. 'beginning balanee' 1.337.0074251780402, "interest_expense's 12.99664586212719, 'canth_flok's 350, 'ending_balane e17.1040167370020940=05}1

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2016 Riva Del Garda Italy September 19 23 2016 Proceedings Part 1 Lnai 9851

Authors: Paolo Frasconi ,Niels Landwehr ,Giuseppe Manco ,Jilles Vreeken

1st Edition

3319461273, 978-3319461274

More Books

Students also viewed these Databases questions

Question

What questions should Jessica ask of Anna?

Answered: 1 week ago

Question

1. Explain the 2nd world war. 2. Who is the father of history?

Answered: 1 week ago

Question

recognise typical interviewer errors and explain how to avoid them

Answered: 1 week ago

Question

identify and evaluate a range of recruitment and selection methods

Answered: 1 week ago

Question

understand the role of competencies and a competency framework

Answered: 1 week ago