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