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
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 of the Boolean type, which means it can hold two values: True or False. Therefore, there are 2 different values for the field beingShown.
Step 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 assignment statement that correctly changes the year of the film Hulk to 2003 is: hulk.year โ 2003. This directly modifies the year attribute of the hulk record.
Step 3
What should the label ๐๐ 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 ๐๐ should be replaced by LEN(filmCollection) - 1 to correctly set the upper limit for the loop, as it needs to iterate through all elements of the filmCollection array.
Step 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
The pseudo-code statement to update the antMan record is: antMan.beingShown โ True. This statement sets the beingShown field of the antMan record to True, indicating that it is currently being shown.