Question: Use the design recipe to define a function save_history which consumes two parameters, a nested list and an int representing the current landing attempt. Function
Function save_historyChistory_list,landing_num [6 points autograded] Use the Desian Recipe to define a function save history which consumes two parameters, a nested list and an int representing the current landing attempt. The function should open a new file named 'LandingNN.csv' where NN is two digits representing the current landing attempt. The first line should contain the number of sublists in the nested list. Each sublists should be written to the file on its own line with its values separated by commas. This function should close the file when its finished writing to it. Include a docstring! For example: Test history - [3.61, 2.98, 15, 0], [3.01 save-history(history, 1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
