Computer Science > EXAM > TM 11120J - The Open University. NCG TM111 TMA02 (All)

TM 11120J - The Open University. NCG TM111 TMA02

Document Content and Description Below

TM 11120J - The Open University 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. T... he 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. (c) Page | 1 . Natalie George TM111 TMA02 L5490096 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 Natalie George TM111 TMA02 L5490096 Figure 2– A screenshot of an OUBuild script which further categorises students based on their math test scores than the script in Figure 1 An excellent solution. It is good to see the use of nested IF statements, these are efficient and you will meet them frequently in the future. ii. An alternate script structure that could have been used would have been 3 separate IF__THEN blocks, one for if the score was >75% to put then in the math challenge list, another for >50% but <75% for the good math score list and finally a <50% list for the low test scores. A very well explained answer. Page | 3 Natalie George TM111 TMA02 L5490096 Question 2 (a) Figure 3– An OUBuild script to show a script built to show a changing multiplication question and a sprite reaction based on whether the question was correct or not. An excellent solution meeting all requirements. Great work. Page | 4 Natalie George TM111 TMA02 L5490096 Question 3 (a) WHEN_GREEN_FLAG_CLICKED Set altered_word to “___” Delete all of HALF_ALPHABET Add “a” to HALF_ALPHABET Add “b” to HALF_ALPHABET Add “c” to HALF_ALPHABET Add “d” to HALF_ALPHABET Add “e” to HALF_ALPHABET Add “f” to HALF_ALPHABET Add “g” to HALF_ALPHABET Add “h” to HALF_ALPHABET Add “i” to HALF_ALPHABET Add “j” to HALF_ALPHABET Add “k” to HALF_ALPHABET Add “l” to HALF_ALPHABET Add “m” to HALF_ALPHABET WHEN [SPACE] KEY PRESSED Delete all of “altered_word_list” Delete all of “user_word_list” Set “position” to 1 Ask: “Type in a word to see it change” Set “user_word” to “answer” Repeat until “position”>”length of “user_word”” add “letter “position” of “user_word” to “user_word_list”” change “position” by 1 Set “position” to 1 Repeat “length of “user_word_list”” IF “HALF_ALPHABET” contains “item “position” of “user_word_list”” then: add “join “letter “position” of “user_word_list”” “letter “position” of “user_word_list”” to “altered_word_list” IF “not “HALF_ALPHABET” contains “item “position” of “user_word_list”” then: add “letter “position” of “user_word_list”” to “altered_word_list” Change “position” by 1 Set “position” to 1 Set “altered_word” to “item “position” of “altered_word_list”” Change “position” by 1 Repeat until “position”>”length of “altered_word_list”” set “altered_word” to “join “altered_word” “item “position” of “altered_word” Page | 5 Natalie George TM111 TMA02 L5490096 change “position” by 1 Say: “altered_word” for 2 secs Your strategy here has been to use lists, this works but it would be simpler with strings. The algorithm is more detailed than needed, it should just show the overall strategy being used. The following would be a full answer: Input word Repeat (length of word) times Append current letter to new word If current letter is in the first half of the alphabet then Append current letter to new word Display new wo [Show More]

Last updated: 11 months ago

Preview 1 out of 12 pages

Add to cart

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Add to cart

Instant download

We Accept:

We Accept

Reviews( 0 )

$10.50

Add to cart

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

OR

REQUEST DOCUMENT
154
1

Document information


Connected school, study & course


About the document


Uploaded On

Jul 24, 2022

Number of pages

12

Written in

Seller


seller-icon
Nancylect

Member since 2 years

99 Documents Sold


Additional information

This document has been written for:

Uploaded

Jul 24, 2022

Downloads

 1

Views

 154


$10.50
What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·