4.1.6

Turning an Algorithm into an App (2/2)

Test yourself

Turning an Algorithm into an App

You need to follow a few more steps to complete your app.

Illustrative background for Event and Control blocksIllustrative background for Event and Control blocks ?? "content

Event and Control blocks

  • You then need to add blocks of code called 'Event and Control blocks'.
  • Event and Control blocks give ‘ifthen’ and ‘repeat until…’ instructions.
Illustrative background for ExamplesIllustrative background for Examples ?? "content

Examples

  • Event and Control blocks control the following in the basketball game:
    • What happens if the mouse is moved? → the red block moves.
    • What happens if the ball touches a wall or the hand? → the ball bounces.
Illustrative background for Other examplesIllustrative background for Other examples ?? "content

Other examples

  • Event and Control blocks control the following in the basketball game:
    • What happens if the ball touches each ‘basket’? → the score of the shooting team goes up.
    • When does the game end? → first team to get to 5 points.
Illustrative background for Variables blocksIllustrative background for Variables blocks ?? "content

Variables blocks

  • Blocks of code that create variables are called variable blocks.
    • Variables are things that can change.
  • Variable blocks of code give instructions for the selection of:
    • the colour, time, distance, the angle of bounces, etc.

Jump to other topics

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium