In this lesson, we will be introduced to two new data structures: a record and a dictionary. The focus of this lesson is on records and how these can be created and used in Python to form a database. We will be shown how to use a dictionary as a record before creating a 'database' using dictionaries within a list.
Unit Overview: Programming 6: Dictionaries and datafiles
In this lesson, we will have the opportunity to use a dictionary data structure in a new context. We will create a Caesar cipher encryption program using a dictionary as the cipher wheel. This mini project will allow us to develop our programming skills through an appropriate challenge.
In this lesson, we will be introduced to text files. The focus will be on reading text files, and how the data from a text file can be used within a program. We will be stepped through the key methods that are used for reading text files in Python, before we complete two text file challenges.
In this lesson, we will continue to explore text files by looking at how to write text files and how to append text files. Live coding will be used to introduce the two new concepts and mini challenges are used to allow us to test our understanding of them.
In this lesson, we will learn what CSV files are and how to use them. We will also learn how to read data into a list and a 2D list. Finally, we will complete a challenge working with the data.
In this lesson, we will learn how to write to CSV files. We will work with 1D and 2D lists, before converting them to string and writing them to CSV files. There are lots of list challenges this lesson, which should help to enhance skills in preparation for the final project.
In this lesson, we will discuss the good habits of a programmer before being reminded of why some of the key aspects are good habits. We will also hear from industry programmers about their own good practice. We will then look at alternative approaches to programming solutions.
In this lesson, we will be introduced to the final programming project of this course: programming a game called Battle Boats.
In this lesson, we will design our Battle Boats game using either Pseudocode or Flowchart in preparation for programming the solution in the next lesson: 'Battle boats code'.
In this lesson, we will code our Battle Boats game. Demonstrations and solutions are provided to give us support if needed, and it is likely to take more than an hour to complete the coding.
In this lesson, we will focus on creating and using a test plan to test our Battle Boats program.
In this lesson, we will complete an evaluation of our Battle Boats program.
Units in Computing
- Data Representation
- Computer Systems
- Impacts on society
- Programming 1: Sequence
- Programming 2: Selection
- Programming 3: Iteration
- Programming 4: Subroutines
- Programming 5: Strings and lists
- Programming 6: Dictionaries and datafiles
- Databases and SQL
- Object-oriented programming