Records and dictionaries
Lesson details
Key learning points
- 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.
Licence
This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.
Loading...
5 Questions
Q1.
A program has been started for a battleship style game. A battleship is represented by a B. Which indices are required to reveal the battleship?
![An image in a quiz](/_next/image?url=https%3A%2F%2Foaknationalacademy-res.cloudinary.com%2Fimage%2Fupload%2Fv1707165086%2Favp2yjd98inrj9z811re.png&w=1080&q=75)
[1][1]
[2][3]
[3][2]
Q2.
What data structure is being used to create the battleboard?
![An image in a quiz](/_next/image?url=https%3A%2F%2Foaknationalacademy-res.cloudinary.com%2Fimage%2Fupload%2Fv1707165121%2Fj8pjcqorckkl9yiua2ys.png&w=1080&q=75)
A dictionary
A list
A record
Q3.
Which arrow points towards the entity?
![An image in a quiz](/_next/image?url=https%3A%2F%2Foaknationalacademy-res.cloudinary.com%2Fimage%2Fupload%2Fv1707165127%2Fmgxvahvuwocyb008gyor.png&w=640&q=75)
B
C
Q4.
Which arrow points towards the data?
![An image in a quiz](/_next/image?url=https%3A%2F%2Foaknationalacademy-res.cloudinary.com%2Fimage%2Fupload%2Fv1707165132%2Fapuoywe8blenj7axry51.png&w=640&q=75)
A
B
Q5.
Which arrow points towards the entities?
![An image in a quiz](/_next/image?url=https%3A%2F%2Foaknationalacademy-res.cloudinary.com%2Fimage%2Fupload%2Fv1707165140%2Fc1nm9ksi6xbo1fvk2c4z.png&w=640&q=75)
A
C