School preview · Teacher-led courses are in preview · Registration is open · Payments and live video are awaiting connection
← Coding Projects

Beginner · Other / specialist pathway · Coding

Variables and simple data

Trace a variable as its value changes.

Original Kidemy beginner self-study unit · Learn the idea, try the practical activity and review your written answers. Review your project with a guardian or teacher using the criteria below. Teacher-led course approval and booking are separate.

Learn the idea

A variable is a named place for a value. Assignment gives it a value; a later instruction can update that value. Trace the instructions one at a time and keep a table of the current value. A demonstration score here is practice data and does not change game coins or grades.

Worked example

Set score to 0. Add 3: score is 3. Add 3 again: score is 6. Add −1: score is 5. Each update uses the current value.

  1. Write the initial value.
  2. Apply one instruction at a time.
  3. Record the new value after each update.

Try it step by step

This is a practice model. It does not change your Kidemy coins or school grades. Use the buttons to test one instruction at a time.

Your written practice

Show your working on paper and enter your answer here. If it does not match, compare the model and try again.

Show model answer and explanation

0

Assignment establishes the initial value.

Show model answer and explanation

6

0 + 3 + 3 = 6.

Show model answer and explanation

5

The updated value is five.

Write in your own words. A guardian or teacher should review this response.

Show model answer and explanation

2 → 6 → 7

Check that each operation uses the updated value.

Write in your own words. A guardian or teacher should review this response.

Show model answer and explanation

Score is the name; 5 is its current value in the example.

Accept a clear distinction between the label and the stored content.

A variable trace table

Make a three-column table: instruction, value before and value after. Trace four number updates.

Review with a guardian or teacher

Keep your work on paper or in a local file. This page does not upload it or automatically grade the project.

Teacher-led lessons, schedules and prices for this outline are upcoming. You can use any starter practice above now without booking.

Your next step

Solo practice works without an account. Sign in to save a practice record to your learner profile.

Keep practising

Exact lesson links and related activities are labelled separately. Return-to-course links retain your selected learning path.

Browse all games and books →