TM111 TMA02/TM111 TMA02/TM111 TMA02
TM111 TMA02
Question 1
(a) When the spacebar is pressed, the user is asked to input the students name, which, in this
case, is Faria. Faria is then stored as a "name" variable. The user is then asked to input their
test score of 72, this is then stored as a "math_test_score" variable. The "percentage_score"
is then worked out by using the variable "math_test_score" * 1.25, which then provides us
with a percentage out of 100. The sprite then informs us of the "percentage_score" for
Faria. In this case, Faria's "percentage_score" is higher than 75% so therefore her name
which was stored in the "name" variable, is now added to the "math_challenge_list" list.
The program was able to decide if Faria was legible for the "math_challenge_list" by using
the "IF percentage_score > 75 THEN" function.
An excellent fully detailed description.
(b)
i. 80
Make it clear what this number represents. Although this might be suitable in an extended version it
is not being used in this program.
The percentage multiplier, 1.25, might be stored in a constant.
ii. MAXIMUM_SCORE
Good to see the naming convention for constants has been followed.
Page | 1
, certifiednurse
TM111 TMA02/TM111 TMA02/TM111 TMA02
(c)
Figure 1– A Screenshot of OUBuild script which shows the use of lists and the IF_Then blocks to categorise students based
on their math test scores.
Excellent
(d)
i.
Page | 2