Figure 8 shows an algorithm, written using pseudo-code, that uses a RECORD data structure for storing information about a film - AQA - GCSE Computer Science - Question 9 - 2023 - Paper 1
Question 9
Figure 8 shows an algorithm, written using pseudo-code, that uses a RECORD data structure for storing information about a film.
Each record stores four pieces of in... show full transcript
Worked Solution & Example Answer:Figure 8 shows an algorithm, written using pseudo-code, that uses a RECORD data structure for storing information about a film - AQA - GCSE Computer Science - Question 9 - 2023 - Paper 1
Step 1
9.1 How many different values can the field beingShown have?
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The field beingShown is a Boolean data type, which can have two possible values: True or False. Therefore, it can have 2 different values.
Step 2
9.2 Which assignment statement changes the year the film Hulk was made to 2003?
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The appropriate assignment statement to change the year would be hulk.year ← 2003. This directly assigns the year 2003 to the field year in the record represented by hulk.
Step 3
9.3 What should the label 11 in Figure 8 be replaced by?
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The label 11 should be replaced by Position. This variable holds the index of the most recent film after the loop, which is crucial for referencing the right film in filmCollection.
Step 4
9.4 Write a pseudo-code statement that updates the antMan record to show that the film is currently being shown at the cinema.
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To update the antMan record, the pseudo-code statement would be: antMan.beingShown ← True. This indicates that the film is currently being shown.