Visual Programming

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

  1. Question 1

    1 mark

    In a visual programming project, a learner wants their program to do one thing if a score is above 10 and something different otherwise. Which type of block should the learner use?

    A. A sound block

    B. A costume block

    C. A conditional (if-then-else) block

    D. A pen block

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  2. Question 2

    1 mark

    In Scratch, Brian wants his sprite to keep moving forward until it touches the edge of the stage. The best control block to use is a:

    A. 'change costume' block

    B. 'say' block

    C. 'stop all' block

    D. 'repeat until' loop

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  3. Question 3

    1 mark

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

    A. Backdrop

    B. Sprite name

    C. Costume

    D. Variable

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  4. Question 4

    1 mark

    Naomi wants her Scratch project to start running the moment the green flag is clicked. She should begin her script with a block from the:

    A. Looks category

    B. Operators category

    C. Events category

    D. Sound category

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  5. Question 5

    1 mark

    A learner wants a program to display the message "Well done" only when a learner's score is 50 or more, and nothing otherwise. Which programming construct achieves this?

    A. An unconditional loop only

    B. A conditional (if) statement

    C. A variable declaration only

    D. A comment block

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  6. Question 6

    6 marks

    Explain three benefits of learning visual programming to a junior school learner. (6 marks)

    (6 marks)

    Marking scheme

    Any three, each explained (2 marks each): develops logical/computational thinking as learners sequence steps; builds problem-solving skills through designing and debugging; encourages creativity by making games, animations and stories; provides a foundation for advanced text-based programming; increases digital literacy relevant to modern careers; boosts confidence and collaboration through project work.

  7. Question 7

    1 mark

    In a Scratch game, Kevin uses an 'if ... then' block so the score increases only when the sprite touches a coin. This block is best described as a:

    A. Conditional/decision block

    B. Motion block

    C. Pen block

    D. Costume block

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  8. Question 8

    1 mark

    In Scratch, to make a sprite say 'Hello' for 2 seconds, a learner would use a block from which category?

    A. Sensing

    B. Motion

    C. Operators

    D. Looks

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  9. Question 9

    1 mark

    In Scratch, the moving character or object that is controlled by the code is called the:

    A. Sprite

    B. Stage backdrop

    C. Toolbar

    D. Palette

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  10. Question 10

    1 mark

    A visual programming environment such as Scratch allows a learner to create programs by:

    A. Typing long lines of machine code

    B. Writing on paper only

    C. Dragging and joining graphical code blocks

    D. Soldering electronic components

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  11. Question 11

    6 marks

    A Grade 9 class is learning visual programming using Scratch. (a) Define visual programming. (2 marks) (b) State two components of the Scratch interface and the function of each. (4 marks)

    (6 marks)

    Marking scheme

    (a) Visual programming is a method of creating computer programs by arranging and connecting graphical/visual blocks instead of typing text code (2 marks). (b) Any two components with function (2 marks each): Stage - where the sprites appear and the program output is displayed; Sprite - the object/character that is programmed to perform actions; Blocks palette - contains the coding blocks grouped in categories; Scripts/coding area - where blocks are dragged and joined to build a program.

  12. Question 12

    1 mark

    Before building a program, Achieng draws boxes and arrows showing the order of steps the program will follow. This diagram is called a:

    A. Flowchart

    B. Bar graph

    C. Timetable

    D. Pie chart

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  13. Question 13

    3 marks

    A learner wants a Scratch sprite to repeat a dance move ten times. (a) Name the type of block that would make the move repeat exactly ten times. (1 mark) (b) Explain the difference between a 'repeat 10' block and a 'forever' block. (2 marks)

    (3 marks)

    Marking scheme

    (a) A 'repeat' (count-controlled) loop block, i.e. 'repeat 10' (1 mark). (b) 'repeat 10' runs the enclosed blocks a fixed number of times (ten) and then stops/continues to the next block, while 'forever' runs the enclosed blocks endlessly and never stops on its own unless the program is stopped (2 marks).

  14. Question 14

    1 mark

    A sequence of instructions written in a logical order to solve a problem, whether in words or blocks, is known as a(n):

    A. Algorithm

    B. Database

    C. Spreadsheet

    D. Browser

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  15. Question 15

    1 mark

    Which of the following is a MAIN advantage of visual (block-based) programming for beginners compared with text-based programming?

    A. It removes the need for logic altogether

    B. It makes computers run faster

    C. It stores more data on the hard disk

    D. It reduces syntax errors because blocks only fit where they are valid

    (1 mark)

    Marking scheme

    D. It reduces syntax errors because blocks only fit where they are valid

  16. Question 16

    1 mark

    When Musa's Scratch program does not behave as expected, the systematic process of finding and correcting the errors is known as:

    A. Debugging

    B. Compiling music

    C. Formatting

    D. Uninstalling

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  17. Question 17

    1 mark

    A learner is building a game in a block-based visual programming environment and wants a sprite to keep moving as long as the score is below ten. Which programming construct should the learner use?

    A. A single comment line

    B. A variable name only

    C. A loop (repeat-until / while) construct

    D. A sprite costume change only

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  18. Question 18

    1 mark

    A learner uses a 'forever' block to make an animation repeat without stopping. The 'forever' block is an example of a:

    A. Variable

    B. Comment

    C. Loop (iteration)

    D. Sound effect

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  19. Question 19

    5 marks

    Wambui creates a Scratch animation but the sprite moves off the screen and disappears. (a) Suggest two possible causes of this problem in her code. (2 marks) (b) Describe how she can debug the animation so the sprite stays on the stage. (3 marks)

    (5 marks)

    Marking scheme

    (a) Any two (1 mark each): the move steps value is too large; there is no 'if on edge, bounce' block; the loop never stops; wrong x/y coordinates set. (b) Debugging (3 marks): run the program and observe where it fails; check each block in sequence; add an 'if on edge, bounce' block or reduce the number of steps; test again after each change until the sprite remains on the stage.

  20. Question 20

    1 mark

    A learner is creating a simple game in a visual programming environment such as Scratch and wants a character to keep moving as long as a key is pressed. Which programming concept should the learner use?

    A. A comment

    B. A variable name

    C. A backdrop

    D. A loop (repetition block)

    (1 mark)

    Marking scheme for this question

    Create a free account to see it
  21. 15 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 9 Pre-Technical Studies topics