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 8 - Computing

Writing a text-based program

Introduction to Python programming

Unit Summary

This unit introduces pupils to text-based programming with Python. Pupils start with programs involving input and output, and gradually move on to using arithmetic operations, randomness, selection, and iteration. Pupils will consolidate these skills in a project at the end of the unit.

Lesson Summary

You will learn to create a text-based program from an algorithm that includes input and output.

Key Notes

  • An algorithm is a sequence of steps that can be followed to do a task.
  • A program is a set of commands that can be run by a computer in order for it to do a task.
  • All programming languages have rules for syntax that must be followed so that the program can run.
  • The print() function is used to output information from a Python program.
  • The input() function is used to input data from the user into a Python program.

Vocabulary To Learn

  • algorithm: a set of step-by-step instructions to solve a problem
  • program: a set of commands that can be run by a computer in order for it to do a task
  • syntax: the precise way that a program must be written to be understood by a computer

Common Mistakes To Avoid

  • Pupils will modify their code to provide input directly in to the input() function, for example, user = input("Aisha"), rather than typing when asked as the program runs.

3 Quick Questions (With Answers)

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

An algorithm is a sequence of steps that can be followed to do a task. A program is a set of commands that can be run by a computer in order for it to do a task.

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

a set of step-by-step instructions to solve a problem. Add one real device or system example to prove understanding.

3. Correct this common computing misconception.

Mistake: Pupils will modify their code to provide input directly in to the input() function, for example, user = input("Aisha"), rather than typing when asked as the program runs. Correction: The computer follows the instructions of a program. Input that a user has to type in should only be entered when the program runs. This allows different users to provide different inputs without changing the program in any way.

More Lessons In This Unit

Browse all guides in the Year 8 Computing guide library.