Computing
ComputingAlgorithms and programming30 min★★★ difficulty

Variables, lists and debugging

Bugs are normal. Finding them quickly is a method, not a talent.

Part of your national curriculum
  • Algorithms and programming: Use two or more programming languages, at least one of which is textual, to solve a variety of computational problems
  • Algorithms and programming: Use a variety of data structures, including lists, tables or arrays, and design modular programs that use procedures or functions
  • Algorithms and programming: Understand simple algorithms, expressed using sequence, selection and iteration, and correct errors in algorithms
  • Algorithms and programming: Design and develop modular programs that use procedures or functions, and test and correct them systematically

Lesson overview

What you'll learn in this lesson

Test and debug a program systematically

Key learning points

  • Storing data
  • Systematic testing

This lesson at a glance

  • 30 minutes
  • 13 parts to scroll through
  • 3 quick checks
  • Marked quiz at the end
  • Gentle pace: short sittings with pauses

Words to know

programsystematicallystoringsystematictesting

Scroll down — the lesson carries on below

Part 1 of 13 · Discover8%
1

Watch & discover

Part 1 of 13

Variables, lists and debugging illustrationVisual introduction

Picture this

Variables, lists and debugging

Bugs are normal. Finding them quickly is a method, not a talent.

In a nutshell

Test and debug a program systematically

2

Explore the idea

Part 2 of 13

Learn

Storing data

A variable holds one value; a list holds many, accessed by index. Meaningful names save more time than clever code.

3

Explore the idea

Part 3 of 13

Learn

Systematic testing

Test normal, boundary and invalid inputs. When something fails, change one thing at a time and print values to see what the program actually holds.

4

Reset break

Part 4 of 13

Pause

That's sitting 1 of 3 done

Stretch, get a drink, look out of the window. There is no timer and nothing is counting down — your place is saved, so you can come back in five minutes or tomorrow.

Stop here for now
5

Quick check

Part 5 of 13

Quick check

A list stores…

6

Quick check

Part 6 of 13

Quick check

A boundary test uses…

7

Quick check

Part 7 of 13

Quick check

When debugging you should change…

8

Reset break

Part 8 of 13

Pause

That's sitting 2 of 3 done

Stretch, get a drink, look out of the window. There is no timer and nothing is counting down — your place is saved, so you can come back in five minutes or tomorrow.

Stop here for now
9

Challenge round

Part 9 of 13

Game · Sort it

Which of these are true?

Drag each card into the right column. Tap a card first if dragging is fiddly.

True

Not true

10

Challenge round

Part 10 of 13

Game · Fill the gaps

Finish the sentences

Choose the word that belongs in each gap.

When something fails, change one thing at a time and print values to see what the ____ actually holds.

11

Challenge round

Part 11 of 13

Game · Recall cards

A list stores…

Card 1 of 4

12

Mastery quiz

Part 12 of 13

Marked quiz

End of lesson quiz: Variables, lists and debugging

4 questions, marked with the reasoning shown. No timer.

  1. 1. A list stores…

  2. 2. A boundary test uses…

  3. 3. When debugging you should change…

  4. 4. Why use a list rather than 30 separate variables for 30 test scores?

13

Lesson round-up

Part 13 of 13

Lesson round-up

Ready when you are

Quiz score

Not sat

Games

Not played

Points this lesson

0

Best run

0 in a row

Luna: 0 out of 3 on the practice checks. Only if you feel up to it — one more?

Ask Luna

Part 1 of 13 · Watch & discover

How this is going

  • Not looked at yet

    Use two or more programming languages, at least one of which is textual, to solve a variety of computational problems

  • Not looked at yet

    Use a variety of data structures, including lists, tables or arrays, and design modular programs that use procedures or functions

  • Not looked at yet

    Understand simple algorithms, expressed using sequence, selection and iteration, and correct errors in algorithms

  • Not looked at yet

    Design and develop modular programs that use procedures or functions, and test and correct them systematically

Good Learning Co. — personalised UK curriculum learning, built around what each learner loves.