Question: This project is intended to implement a program to help the teacher record how many paintings pupils have completed during the school term, up to

This project is intended 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 pupils 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.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 pupils 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)
b.
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)
c.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)
d.
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.
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 arent expected to give any details of your testing; this is just to help you check your program.)
Test number Test purpose Test inputs Expected results
Paintings completed, out of a maximum number of 25 Name Name added to list
1 Just below lower boundary value 9 p1 Picasso_list
2 Lower boundary value
10(equivalent to 40%)
p2 Kahlo_list
3 Just above lower boundary value 11 p3 Kahlo_list
4 Just below upper boundary value 19 p4 Kahlo_list
5
Upper boundary value
20(equivalent to 80%) p5 Kahlo_list
6 Just above upper boundary value
21
p6 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 PI is your OU personal identifier, e.g. A1234567) in your TMA zip file. Alternatively, you may use your OUCU instead of your PI.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!