CS106 Summer 2026 Michael Eckmann Lab 05 July 9, 2026 ================== Purpose: gain experience writing functions and programs that use them =================== 1. Create a program named printererror.py and within that program, write a function named errorText that takes in an error code as a parameter which you may assume will always be an int. The errorText function should contain code that checks the error code and returns the appropriate error message. Note: the errorText function should not have any print statements in it. The error codes and their meanings are as follows: 10 means Paper jam 20 means Out of paper 30 means Unprintable data 40 means Printer on fire if an unknown error code is passed in, return 'Unknown Error' Write code below the function to loop five times and ask the user for an error code and call your function and print out what it returns each time. Example run: Enter error code: 20 Out of paper Enter error code: 40 Printer on fire Enter error code: 40 Printer on fire Enter error code: 40 Printer on fire Enter error code: 11 Unknown Error =================== 2. Write a program named addten.py that contains a function that takes in a list (assumed to contain numbers) and changes that list such that each element that is a multiple of 3 should have 10 added to it. The function you write should change the values in the list that is passed in. It should NOT return a list. e.g. If this list is passed in: [4, 8, 9, 0, 3] this list should be returned: [4, 8, 19, 0, 13] notice that 9 and 3 are the only multiples of 3 in the list and 9 + 10 is 19 and 3 + 10 is 13 Make sure to name the variables in the function different from the variable names in the code that you are to write below the function which should loop and get numbers from the user until the user types 'q'. While the user is entering those numbers, append them to a list and call your function on that list after the user is done and print out the resulting list. =================== submit: printererror.py addten.py