Visual Programming

23 Grade 8 Pre-Technical Studies questions on Visual Programming, with worked marking schemes. 23 questions are available on this topic in full.

  1. Question 1

    1 mark

    A learner wants to store a player's score that increases during a game. The best feature to use is a:

    A. Variable

    B. Sound

    C. Backdrop

    D. Costume

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  2. Question 2

    3 marks

    State three benefits of learning visual programming to a Grade 8 learner.

    (3 marks)

    Marking scheme

    1 mark each (any 3): Develops logical/computational thinking; makes coding easy and fun without complex text syntax; helps create interactive games/animations/stories; builds problem-solving skills; prepares learner for advanced text-based programming; encourages creativity.

  3. Question 3

    1 mark

    A learner is building a project in a block-based visual programming environment and wants an action to keep repeating a fixed number of times. Which programming construct should the learner use?

    A. A loop block

    B. A comment block

    C. A variable block

    D. A sound block

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  4. Question 4

    1 mark

    A sprite needs to detect when it touches another sprite. Which block category provides this?

    A. Looks blocks

    B. Sound blocks

    C. Operators blocks

    D. Sensing blocks

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  5. Question 5

    1 mark

    In visual programming, a 'sprite' refers to:

    A. A block of code

    B. A background image of the stage

    C. A programmable object or character in the project

    D. A sound effect

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  6. Question 6

    6 marks

    In a computer lesson, learners use a visual (block-based) programming application like Scratch to make a sprite (character) move and speak when a key is pressed.

    (a) State what is meant by visual (block-based) programming. (2 marks)

    (b) Give TWO advantages of using visual programming for beginners compared with typing text code. (2 marks)

    (c) In Scratch, a 'sprite' and a 'script' are used. Briefly explain what each term means. (2 marks)

    (6 marks)

    Marking scheme

    (a) Visual (block-based) programming is a way of creating programs by dragging and joining together graphical blocks/instructions instead of typing lines of text code; the blocks snap together to form the program. (2 marks) (b) Any TWO (1 mark each): It is easier for beginners because they do not need to memorise programming syntax/commands; there are fewer typing errors since blocks only fit together correctly; it is more visual and motivating, making it easier to understand the flow of the program; mistakes are easy to spot and correct. (c) Sprite: an object/character or image on the screen that can be programmed to move, change or react (1 mark). Script: the set/sequence of blocks (instructions) joined together that tells a sprite what to do (1 mark).

  7. Question 7

    1 mark

    In Scratch, the area where sprites move and the project is displayed is called the:

    A. Script area

    B. Block palette

    C. Stage

    D. Sprite list

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  8. Question 8

    4 marks

    A learner's Scratch game does not start when the green flag is clicked. Suggest two possible reasons and how each can be corrected.

    (4 marks)

    Marking scheme

    2 marks per reason+fix (any 2): Reason - no 'when green flag clicked' event block attached to the script; fix - add the block at the top of the script. Reason - the script is attached to the wrong sprite/stage; fix - select the correct sprite before adding blocks. Reason - blocks are not properly joined; fix - snap blocks together correctly.

  9. Question 9

    1 mark

    Which Scratch block changes what a sprite looks like by switching between different images?

    A. 'play sound'

    B. 'switch costume to'

    C. 'move 10 steps'

    D. 'set x to'

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  10. Question 10

    4 marks

    Describe the steps a learner would follow to make a sprite say 'Karibu' for 2 seconds when the space key is pressed in Scratch.

    (4 marks)

    Marking scheme

    1 mark: Select the sprite. 1 mark: Drag the 'when space key pressed' event block to the script area. 1 mark: Attach a 'say Karibu for 2 seconds' block from Looks below it. 1 mark: Test by pressing the space key to confirm the sprite says 'Karibu' for 2 seconds.

  11. Question 11

    1 mark

    Which block category in Scratch is used to make a sprite change its x and y position on the stage?

    A. Motion blocks

    B. Sensing blocks

    C. Looks blocks

    D. Sound blocks

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  12. Question 12

    1 mark

    In a block-based visual programming environment such as Scratch, a program is built by:

    A. Dragging and joining coloured blocks

    B. Writing binary numbers

    C. Typing lines of text code

    D. Recording voice commands

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  13. Question 13

    1 mark

    An 'event' block in Scratch is one that:

    A. Draws shapes on the stage

    B. Changes the volume of a sound

    C. Stores numbers for later use

    D. Starts a script when something happens, such as a key press

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  14. Question 14

    1 mark

    In visual programming, an algorithm is best described as:

    A. A sound file

    B. The colour of a block

    C. A type of sprite

    D. A step-by-step sequence of instructions to solve a problem

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  15. Question 15

    4 marks

    (a) Define the term 'loop' as used in visual programming.

    (b) Give one example of a loop block and state when it is useful.

    (4 marks)

    Marking scheme

    (a) 2 marks: A loop is a block/structure that repeats a set of instructions one or more times. (b) 2 marks: Example - 'repeat 10' or 'forever' (1 mark); useful when an action needs to be done many times such as making a sprite walk continuously or flash repeatedly (1 mark).

  16. Question 16

    1 mark

    A learner wants her program to do one thing if a score is above 10 and a different thing otherwise. Which block should she use to make this decision?

    A. A pen block

    B. A motion block

    C. An if-else (conditional) block

    D. A start block

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  17. Question 17

    1 mark

    Which block is used to make a decision based on whether a condition is true?

    A. 'if...then'

    B. 'play sound'

    C. 'switch costume'

    D. 'move 10 steps'

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  18. Question 18

    1 mark

    Which of the following is an advantage of block-based visual programming for beginners?

    A. It requires memorising complex syntax

    B. It cannot produce interactive projects

    C. It works only on supercomputers

    D. It reduces errors caused by wrong spelling of commands

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  19. Question 19

    1 mark

    A learner wants a sprite to say 'Hello' only when the green flag is clicked. The correct starting block is:

    A. 'when backdrop switches'

    B. 'when green flag clicked'

    C. 'when this sprite clicked'

    D. 'when key pressed'

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  20. Question 20

    4 marks

    A learner writes a Scratch script: when green flag clicked, move 10 steps, forever loop containing 'if on edge, bounce'.

    (a) State what happens when the green flag is clicked.

    (b) Explain the purpose of the 'if on edge, bounce' block.

    (4 marks)

    Marking scheme

    (a) 2 marks: When the green flag is clicked the sprite moves 10 steps forward and then keeps moving because of the forever loop. (b) 2 marks: The 'if on edge, bounce' block detects when the sprite reaches the edge of the stage and turns it around so it moves in the opposite direction instead of getting stuck.

  21. Question 21

    1 mark

    A learner wants a sprite to repeat an action exactly 10 times. Which block is most appropriate?

    A. 'forever' block

    B. 'wait until' block

    C. 'repeat 10' block

    D. 'if...then' block

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  22. Question 22

    1 mark

    A learner is creating a game in Scratch and wants a sprite to keep moving forward continuously until stopped. Which control block should be used?

    A. 'forever' loop block

    B. 'wait 1 second' block

    C. 'stop all' block

    D. 'if...then' block

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  23. Question 23

    1 mark

    A learner using a block-based visual programming tool wants a sprite to repeat the same action many times. Which programming construct should the learner use?

    A. A comment block

    B. A sound block

    C. A loop block

    D. A variable block

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  24. 17 more marking schemes are on this page. A free account opens all of them, and lets you build your own paper on the topics you have actually taught, laid out in KNEC format with its full marking scheme.

    Create a free account

More Grade 8 Pre-Technical Studies topics