to implement a program to help the teacher record how many paintings pupils have completed during the school term, up to a maximum of 25 paintings. Before recording the number of paintings completed by each pupil, the teacher will start the program using the green flag. She will then press her space key whenever she wants to record a pupil's number of paintings, which she will enter out of a maximum of 25. If the number, as a percentage of the maximum of 25, is more than 80%, then the pupil will be awarded a Renoir sticker. In this project, we have provided a when_green_flag_clicked script and a when[space] key_pressed script. Consider these scripts carefully and then answer the questions below. a. b. C. d. Complete the step-by-step description below of what the when [space]key_pressed script does when the user starts the program using the green flag, then presses the space key, and enters 'Rowan', and then 22. The user is asked to enter a pupil's name. Their input, 'Rowan', is stored in the variable name. The user is asked to enter the number of paintings completed by the pupil out of a maximum of 25... Your description should make clear what data is stored in the variables and the list involved, and the result of any comparison that is made. You should describe what happens in the particular scenario here, with the inputs 'Rowan' and 22, not what the script does in general or what might have happened with different inputs. (4 marks) i. Identify a numerical value used in this program that might appropriately be stored in a constant. (Recall that a constant is a value that plays a significant role in a program and does not change during the time the program is running.) There may be more than one possibility but you are only required to identify one. You are not asked to implement this constant. (1 mark) ii. What might be an appropriate name for the constant you have chosen? (1 mark) Amend the when_green_flag_clicked and when[space]key_pressed scripts so that: If a pupil completes more paintings than 80% of the maximum, their name is added to the list Renoir_list. Otherwise, their name is added to a list Kahlo_list (which you should create and initialise appropriately). Take a screenshot of your resulting scripts and paste it into your TMA document. (5 marks) i. Further amend the when_green_flag_clicked and when[space]key_pressed scripts so that: If a pupil completes more paintings than 80% of the maximum, their name is added to the list Renoir_list./nTest number 1 2 3 4 5 6 If a pupil completes fewer paintings than 40% of the maximum, their name is added to a list Picasso_list (which you should create and initialise appropriately). Otherwise, their name is added to the list Kahlo_list. Check that your program passes the following tests. (You aren't expected to give any details of your testing; this is just to help you check your program.) Test purpose Just below lower boundary value Lower boundary value Just above lower boundary value Just below upper boundary value Upper boundary value Just above upper boundary value Test inputs Paintings completed, out of a maximum number of 25 9 10 (equivalent to 40%) 11 19 20 (equivalent to 80%) 21 Name p1 p2 p3 p4 ps p6 Expected results Name added to list Picasso_list Kahlo_list Kahlo_list Kahlo_list Kahlo_list Renoir_list Take a screenshot of your resulting scripts and paste it into your TMA document. (7 marks) ii. Different forms of selection structure could be used to meet the specification in Q1 (d) (i). Briefly describe an alternative form of selection structure to the one you chose. (2 marks) Save your final version of the OUBuild project for Question 1 and submit it as TM111_02_Q1_PI.sb2 (where Pl is your OU personal identifier, e.g. A1234567) in your TMA zip file. Alternatively, you may use your OUCU instead of your Pl. 16/11/23
Fig: 1
Fig: 2