(Solved) : Objectives Reading Understanding Code Passes Lists Argument Practice Designing Functions T Q41334409 . . .

Objectives • Reading and understanding code that passes lists as argument • Practice designing functions that take lists as aObjectives • Reading and understanding code that passes lists as argument • Practice designing functions that take lists as arguments Part I – Getting started 1. Download lab6_scope.py to your H: drive Lab6 folder and then open it. 2. There are 5 exercises in this file where each exercise function has a call to it in the main function. For each exercise: a. Uncomment the code for just that exercise in the main b. With pen and paper trace the code and write down what you think the output will be c. Run the lab6_scope.py program to compare your expected output with the actual output d. Take time to clarify with your neighbor or lab instructor if it was not what you expected CHECK POINT – get your lab TA to check off that you have completed this part. They will want to see the comparison of your expected result to the actual result. Part 1 – Designing functions that take lists as arguments Download and open lab6_fn_design.py to your H: drive Lab6 folder 1. In your lab6_fn_design.py file the design of the sum function is started for you. That is, the first few steps of the function design process have been completed for. You have also been provided with a number of steps to follow when implementing the function. The steps are provided to demonstrate how to break problems and ultimately function design down into small attainable steps. Complete the sum function and run the test function to ensure you have done it correctly. 2. Complete the function design for addi according to the tests and documentation provided so far in lab6_fn_design.py CHECK POINT – get your lab TA to check off that you have completed this part. They will want to see your function design (documentation, tests and function definition) as well as see the program. 3. Complete the following functions according to the descriptions in lab6_fn_design.py Don’t forget your tests! a. count_above b. keep_negs c. are_all_even CHECK POINT – get your lab TA to check off that you have completed this part. They will want to see the output of the tests for each of your functions. They will also want to see your documentation and that your tests have proper coverage of your functions. Show transcribed image text Objectives • Reading and understanding code that passes lists as argument • Practice designing functions that take lists as arguments Part I – Getting started 1. Download lab6_scope.py to your H: drive Lab6 folder and then open it. 2. There are 5 exercises in this file where each exercise function has a call to it in the main function. For each exercise: a. Uncomment the code for just that exercise in the main b. With pen and paper trace the code and write down what you think the output will be c. Run the lab6_scope.py program to compare your expected output with the actual output d. Take time to clarify with your neighbor or lab instructor if it was not what you expected CHECK POINT – get your lab TA to check off that you have completed this part. They will want to see the comparison of your expected result to the actual result. Part 1 – Designing functions that take lists as arguments Download and open lab6_fn_design.py to your H: drive Lab6 folder 1. In your lab6_fn_design.py file the design of the sum function is started for you. That is, the first few steps of the function design process have been completed for. You have also been provided with a number of steps to follow when implementing the function. The steps are provided to demonstrate how to break problems and ultimately function design down into small attainable steps. Complete the sum function and run the test function to ensure you have done it correctly. 2. Complete the function design for addi according to the tests and documentation provided so far in lab6_fn_design.py CHECK POINT – get your lab TA to check off that you have completed this part. They will want to see your function design (documentation, tests and function definition) as well as see the program. 3. Complete the following functions according to the descriptions in lab6_fn_design.py Don’t forget your tests! a. count_above b. keep_negs c. are_all_even CHECK POINT – get your lab TA to check off that you have completed this part. They will want to see the output of the tests for each of your functions. They will also want to see your documentation and that your tests have proper coverage of your functions.

Expert Answer


Answer to Objectives • Reading and understanding code that passes lists as argument • Practice designing functions that take l…