Skip to content

Study Hub

Study Guides

This pupil-friendly study guide includes a unit summary, clear notes, common mistakes, and quick questions with answers.

Year 10 - Computing

Variables and constants in programs

Programming: sequence

Unit Summary

In this unit pupils will discover computers process instructions. They will recognise the function and tools IDEs provide for developing code and start to develop Python programa which follow a sequence. Pupils will create programs which deal with input and output and make variables to store values.

Lesson Summary

You will learn to apply appropriate naming conventions and explain the differences between variables and constants.

Key Notes

  • Naming conventions improve code readability and maintainability.
  • A variable is a named piece of data stored in a computer's memory.
  • A variable can be accessed and changed by a computer program.
  • Variables must be declared and assigned values in a program.
  • Constants hold fixed values that do not change throughout the running of the program.

Vocabulary To Learn

  • variable: a named piece of data stored in a computer's memory which can be accessed and changed by a computer program
  • declaration: the process of stating the name of a variable or constant and defining its data type
  • initialisation: assigning a starting value to a variable to let the compiler know that a memory location is required
  • constant: a value that cannot be changed during the execution of a program

Common Mistakes To Avoid

  • You can define a constant in any programming language.

3 Quick Questions (With Answers)

1. Describe the system or process from this lesson in clear steps.

Naming conventions improve code readability and maintainability. A variable is a named piece of data stored in a computer's memory.

2. Define this computing term and give one practical example. 'variable'

a named piece of data stored in a computer's memory which can be accessed and changed by a computer program. Add one real device or system example to prove understanding.

3. Correct this common computing misconception.

Mistake: You can define a constant in any programming language. Correction: Python does not have constants. But if you want a value to be treated as a constant, it's a common naming convention for the identifier to be written in capital letters.

More Lessons In This Unit

Browse all guides in the Year 10 Computing guide library.