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

Reading text files

Programming: dictionaries and data files

Unit Summary

This unit introduces pupils to the new data structures of records and dictionaries. They will develop a Caesar cipher encryption program using a dictionary as a cipher wheel. Pupils will explore how data can be read from and written to files and how this data can be used within a program.

Lesson Summary

You will learn to open and read data from a text file in a program.

Key Notes

  • A file is a term used to describe data that is held in storage on a computer.
  • File-handling is a term used to describe how programs work with the files that are stored in a computer.
  • Different file-handling modes allow you to perform different operations on the contents of a file.
  • Saving program data to an external file allows the data to be reused when the program runs again.

Vocabulary To Learn

  • file: a collection of data stored digitally, identified by a name
  • file-handling: an operation that is specified within a command to open a file, that determines how a file can be used
  • strip(): a Python method which removes any leading and trailing whitespaces or characters that you specify

Common Mistakes To Avoid

  • A text file can be stored anywhere to be used in a program using just the file name.

3 Quick Questions (With Answers)

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

A file is a term used to describe data that is held in storage on a computer. File-handling is a term used to describe how programs work with the files that are stored in a computer.

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

a collection of data stored digitally, identified by a name. Add one real device or system example to prove understanding.

3. Correct this common computing misconception.

Mistake: A text file can be stored anywhere to be used in a program using just the file name. Correction: A text file must be stored in the same location as a program to be used to be accessed by file name alone. If it is stored elsewhere, the full path of the file will also need to be included.

More Lessons In This Unit

Browse all guides in the Year 11 Computing guide library.