Single lesson · Written for AQA GCSE Computer Science (8525)

Data types – AQA GCSE Computer Science lesson (8525)

Pupils learn to choose the right data type (integer, real, Boolean, character, string) and convert between strings and numbers in the class's language.

Also in a bundle Computer Systems and First Programs – AQA GCSE Computer Science lessons (8525) 13 lessons for £39 · save 25% on buying separately

Lesson 6 of 13 in unit 10.1 Computer Systems and First Programs, taught in Year 10, Autumn 1. It answers one big question: Why does a program care what kind of data it holds?

By the end, pupils can choose the right data type (integer, real, Boolean, character, string) and convert between strings and numbers in the class's language.

The Build (the main task)
State the most suitable data type for pupils, costPerPupil, paid and tripCode. (4 marks) Write a program that inputs the number of pupils and the cost per pupil, converts each to the right data type and outputs the total cost. (4 marks)
Support version
Parsons problem: the program's lines are jumbled with one distractor that does not convert the input.
Challenge
Write a program that inputs the number of adults and the price of one adult ticket (such as 8.50), converts each to the right data type and outputs the total cost. (4 marks) Explain why a phone number such as 07700 900123 should be stored as a string, not an integer. (4 marks) The trip planner stores paid as a Boolean and tripCode as a character. State one value each could hold (2 marks). Write code that converts the integer pupils to a string and joins it to "Pupils: " with + or & before it is output (2 marks). Explain what goes wrong if the cost per pupil, 12.50, is converted to an integer instead of a real (2 marks).
Real-world link
The trip planner must turn '32' typed by a teacher into the number 32 before it can work out a cost.
Key words
Data type, Real and Character, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“Input gives a number when the user types digits”; “'5' and 5 are the same value”.
AQA 8525 specification
3.2.1 (data types: integer, real, Boolean, character, string); 3.2.8 (string handling: string conversion (string to integer and real, integer and real to string)).

Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.

Pupils need computers for the main task.

Also sold in the Computer Systems and First Programs unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.

Choose your school's Paper 1 language when you buy: C#, Python or VB.NET. You get that language's files: every program, code example, worked answer and programming task is written in it, and lessons with no code are the same in all three. Algorithms are also shown in AQA pseudo-code, as in the exam.

An independent resource written for AQA GCSE Computer Science (8525). It is not endorsed by AQA.

What's included

  • Slide deck (PowerPoint)
  • Lesson plan (Word)
  • Worksheet (Word)
  • Support worksheet with scaffolds (Word)
  • Single-teacher licence: use and adapt it with your own classes
  • Your choice of Paper 1 language: C#, Python or VB.NET

More for GCSE Computer Science (AQA)

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.