Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1RECORD Student: name AS String, age AS Integer, enrolled AS Boolean | AThe values do not match the field data types. age should be the Integer 16 and enrolled should be the Boolean True. | |
| 2students[2].name | Bs1 <- Student("Ava", 16, True) | |
| 3One record describes one entity, so each field holds one fact about that same student | CThe fields have no data types. Each field needs a name and a data type, such as name AS String and age AS Integer. | |
| 4An array of records is like a table: each record is a row and each field is a column | DReads the name field from the third record in an array of records | |
| 5RECORD Student: name, age, enrolled | EDefines a record type with three fields, each with its own data type | |
| 6Student("Ava", "sixteen", "yes") | Fstudents = [Student("Ava", 16, True), Student("Liam", 17, False)] |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
record — A data structure that groups related fields of different data types into one item describing one thing, e.g. a student's name (String), age (Integer) and enrolled (Boolean).Record Student
name : String
age : IntegerRecord Student
name : String
age : IntegerRecord Student
age : Integer
enrolled : Booleanstudents ← Array of Student, size 30
students[1].name ← "Ava"students[0].name ← "Ava"
students[0].age ← 16
print students[0].age