2.2.5

Turning an Algorithm into an App

Test yourself on Turning an Algorithm into an App

Test your knowledge with free interactive questions on Seneca — used by over 10 million students.

Turning an Algorithm into an App

You can use a coding program to turn your algorithm into an app. You can make an app from an algorithm by following these steps:

Create the background

Create the background

  • Start by creating a background for your app.
Create the moving objects

Create the moving objects

  • Create the moving objects.
    • In the basketball game, the moving objects are the ball and the hand.
  • Moving objects can also be called 'sprites'.
Name the moving objects

Name the moving objects

  • Name the moving objects so you can apply different blocks of code to each one.
    • You need to name them otherwise so you can tell the algorithms which parts the algorithm applies to.
Make the ball move and bounce

Make the ball move and bounce

  • Make the ball move and bounce off the red and blue blocks and the walls.
    • Blocks of code which create movement in objects or sprites are called 'movement blocks'.

Turning an Algorithm into an App

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

Event and Control blocks

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.
Event and Control blocks 2

Event and Control blocks 2

  • 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.
    • 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.
Variables blocks

Variables blocks

  • Blocks of code that create variables (things that can change) are called variable blocks.
  • Variable blocks of code give instructions for the selection of the colour, time, distance, the angle of bounces, etc.
Jump to other topics
1

Computational Thinking & Algorithms

2

Programming

3

Hardware & Software

4

Data

5

The Internet

6

Online Safety & Security

Practice questions on Turning an Algorithm into an App

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
Answer all questions on Turning an Algorithm into an App

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