Professional Documents
Culture Documents
SA SA SA SA2 2 2 2 Programming Programming Programming Programming
SA SA SA SA2 2 2 2 Programming Programming Programming Programming
SA2 PROGRAMMING
REVISION MANUAL
1
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
2
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
11. The application must contain a timer and three levels' will appear in which stage?
a. Development
b. Design
c. Evaluation
d. Requirements
12. Custom sprites are created in which stage?
a. Design
b. Development
c. Requirements
d. Evaluation
13. In programming, a variable is used to
a. store data which changes each time the program executes
b. give instructions to the CPU so that it can perform a task
c. control a Sprite in Scratch
d. none of the above
14. In which order are the stages completed when creating an application?
a. Design, development and evaluation
b. Development, design and evaluation
c. Evaluation, development then design
d. Debugging then testing
15. What is evaluation?
a. Planning something.
b. Adding a costume to a sprite.
c. Making a judgement about something.
d. Building something.
16. How is debugging different to testing?
a. Debugging creates errors while testing fixes errors.
b. Debugging is searching for errors while testing is fixing errors.
c. Testing is searching for errors while debugging is fixing errors.
d. They are exactly the same!
3
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
17. The programming construct ITERATION such as the Forever block in Scratch refers to:
a. performing an action if a certain condition is true
b. comparing the values in two variables
c. branching from one part of a program to another
d. repeating a sequence of instructions
18. An advantage of a custom block is:
a. it creates more work.
b. it makes programming harder.
c. it can condense a number of blocks into one block.
d. it takes longer to code the application.
19. A variable’s data type
a. changes as the program executes
b. determines the kind of operations may be performed on the variable
c. determines the type of comment that can be included in the variable’s documentation
d. none of the above
20. The features required in an application are listed in which stage?
a. Debugging and testing
b. Application design
c. Application evaluation
d. Application requirements
21. Storyboards are created in which stage?
a. Design
b. Evaluation
c. Requirements
d. d. Development
22. The programming construct ITERATION refers to:
a. performing an action if a certain condition is true
b. comparing the values in two variables
c. branching from one part of a program to another
d. repeating a sequence of instructions
4
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
5
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
29. Why is a syntax error relatively easier to identify compared with a logic error?
a. It is because a syntax error would not affect the functionalities of a program and can often
be ignored
b. It is because a logic error can be recognized by compiler at compilation time while
identifying a syntax error can potentially involve comparing all the possible results
generated by the program against the expected results
c. It is because a syntax error can be recognized by a compiler at compilation time while
identifying a logic error can potentially involve comparing all the possible results generated
by the program against the expected results.
d. None of the above
30. Which programming construct should be used if portions of code need to be selectively executed
or skipped based on certain condition(s)?
a. Sequence construct
b. Branching construct
c. Repetition construct
d. Exception construct
31. In the following pseudocode, what is the value of the variable index at the end of the procedure?
set number1 to 1
set index to 1
repeat until index > 5
set index to index + number1
a. 1
b. 4
c. 5
d. 6
32. Referring to the pseudocode in Question 18, what is the value of the variable number1 at the end
of the procedure?
a. 1
b. 4
c. 5
d. 6
6
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
7
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
41. When the following pseudocode is executed with variables Age and NewAge in the Scratch
pseudocode below, what is the result displayed for a user who is 17?
8
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
9
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
a. Square
b. Triangle
c. Rectangle
d. Circle
10
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
50. ____________ is a software that is used to create a series of instructions that will control the
behaviour of a computer
a. Instructions
b. Programming language
c. System Software
d. Application Software
51. __________________ is a series of connected instructions or blocks
a. Blocks
b. Scripts
c. Functions
d. Iteration
52. Below is a script from a Scratch application. What type of shape will be drawn after the script is
executed
a. Square
b. Triangle
c. Rectangle
d. Circle
11
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
53. Below is a script from a Scratch application. What type of shape and colour will be drawn after
the script is executed
a. Rectangle
b. Red Square
c. Red Rectangle
d. Circle
54. Identify the type of event used in Question 51
a. When this sprite is clicked
b. When flag clicked
c. When I receive move
d. When backdrop switch to Shapes
12
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
13
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
59. Below is the script from a Scratch Application. What will be the result of the following script if the
number 5 is entered?
a. 5
b. 20
c. 15
d. 10
60. Below is the script from a Scratch Application. What is the value of final value of counter and
results
a. 5 and 15
b. 10 and 5
c. 15 and 5
d. I5and5
14
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
61. Below is the script from a Scratch Application. What is the value of final value of x and y
a. 31 and 12
b. 31,12
c. 12 and 31
d. None of the above
62. ______________ is a single line of code which instructs CPU to perform task in Scratch, blocks
are used.
a. Internal documentation
b. Instruction
c. Stage
d. Backdrop
15
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
64. Below is the script from a Scratch Application. What is the value of final value of a and i
a. 7, 5
b. 5 and 7
c. 5,7
d. 7 and 5
16
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
66. Below is the script from a Scratch Application. What is the value of final value of a
a. 11
b. 21
c. 20
d. 5
17
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
67. Below is the script from a Scratch Application. What is the value of final value of a
a. 25
b. 20
c. 35
d. 50
18
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
69. Below is the script from a Scratch Application. What is the value of final value of a
a. 26
b. 21
c. 35
d. 20
70. A single environment where all the development of an application occurs
a. Integrated Development Environment (IDE)
b. Internal Documentation
c. Function
d. Scripts
19
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
71. A sprite is an object that can move. A sprite can also be re-sized, unlike a backdrop.
a. True
b. False
72. Most applications will have at least one sprite.
a. True
b. False
73. Blocks can be selected from the blocks palette
a. True
b. False
74. A block is an instruction.
a. True
b. False
75. Blocks have been organised into 10 groups
a. True
b. False
76. Each block in a group will have the same colour.
a. True
b. False
77. ____________________ is a programming language model organised around objects rather than
the actions and data rather than logic
a. Object-oriented methodology
b. Object-Oriented programming
c. Object-oriented model
d. Low level language
78. Scripts are created in
a. Backdrop
b. Block Platte
c. Script Area
d. Sprite Area
79. Which control structure executes instructions in the order that they are written?
a. Selection
b. Sequence
c. Assignment
d. Iteration
20
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
80. Identify the output produced by the application if the test data of 100 was input.
a. Weight
b. Weight out of range.
c. You are a healthy weight.
d. You are a very healthy weight.
81. Which of the following lines of code in the pseudocode contains an operator?
a. Else
b. Input Weight
c. If Weight > 100 Then
d. Print “You are a very healthy weight”
82. Which type of control structure is used in the application?
a. Sequence and Selection
b. Sequence and Iteration
c. Selection and Iteration
d. Sequence, Selection and Iteration
21
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
83. Which is the best set of test data to test the validation rule below?
22
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
23
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
Structured Questions
1. A program is created to accept input and display the Name and YearOfBirth and Gender of
a student. The input into this program should be validated.
For example, Name might be entered as “John Doe”, YearOfBirth might entered as 1998
and Gender might be entered as “M”.
a. What is the importance of validation in programming?
[2 marks]
2. In Scratch, when the sprite called Cat is clicked, the Cat is made to repeatedly move 5 steps
forward and 5 steps backward 100 times and then say “That’s tiring”.
a. Write the Scratch codes to achieve the above (using iteration).
[5 marks]
[2 marks]
3. Determine the value stored in variable x and variable y at the end of the execution of these
scripts.
set x to 4 set y
to 2 repeat
until y = 0 set
x to x-1 set y
to x-2
Variable x = _______________________________________________________________
Variable y = _______________________________________________________________
[2 marks]
4. Determine the output at the end of the execution of these scripts.
set b to 10
set a to 20 set b to
b + a if a * 4 > b *
2 Then say b
else
say a
Output = __________________________________________________________________
[2 marks]
5. Why are variable types important in programming? Explain your answer with examples to
support your explanation.
24
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
[2 marks]
[6 marks]
10. Trace the following lines of Scratch codes and fill in the values of the variables in the tables below
when these codes are executed.
1 set z to 3
2 set y to 1
3 set x to 2
4 repeat until x > 15
5 change x by 3
6 set z to x + y
7 set y to z + 2
8
VARIABLES
Lines executed
x y z
1, 2, 3 2 1 3
4-7
4-7
4-7
4–7
4-7
25
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
b. Why are logic errors the most difficult type of error to detect?
[2 marks]
14. Trace the following lines of Scratch codes and fill in the values of the variables in the tables below
when these codes are executed.
1 set bob to true
2 set cat to 10
3 set x to 2
4 repeat until cat > 20
5 change cat by 2
6 set x to x + cat
7 change x by 1
8 if cat < x Then
9 set bob to false
26
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
VARIABLES
Lines executed
bob cat x
1, 2, 3 true 10 2
16. How are low-level and high-level programming languages different in terms of complexity and
portability?
[2 marks]
17. Explain the difference between non-array variables and lists (arrays). Provide an example of a
programming situation where a list (array) would be appropriate.
[3 marks]
18. List and briefly describe the three core constructs of a computer program
[3 marks]
27
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
24. Define the repletion control block. Briefly explain three example of repetition block
[4marks]
28
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
25. You were asked to create an application with the following requirements
• User input customer’s name and age
• If the age is at least 21 then print – You are eligible to vote.
• If the age less than 21 then print – Too Young. You are not eligible to vote.
You have created the script for the application.
29
MUF0051 ICT UNIT 1 REVISION MANUAL SA2 – SCRATCH PROGRAMMING
b. Describe, using examples, the different control structures used in the script above.
[4 marks]
c. Identify the operators used in the script above. Explain the purpose of the operator
[3 marks]
f. List and describe one block that was used to create the conversation in between the Scratch Cat
and User
[3 marks]
You realise that your script contains error
When you enter 22 you realise that the program displays the greeting Hi There <name> and not the
message “You are eligible to vote”
After correctio the script for part (d) You realise that when you enter 21 you realise that the
program displays the greeting Hi There <name> and message “Too young. You are not eligible to
vote”
30