Photo AI

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 icon

Question 9

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.png

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

Answer

The field beingShown is a Boolean data type which can represent two possible states: True or False. Therefore, it can have 2 different values.

Step 2

Which assignment statement changes the year the film Hulk was made to 2003?

99%

104 rated

Answer

The correct assignment statement that changes the year the film Hulk was made to 2003 is A hulk.year ← 2003. This directly assigns the year 2003 to the year field of the hulk record.

Step 3

What should the label 11 in Figure 8 be replaced by?

96%

101 rated

Answer

The label 11 in Figure 8 should be replaced by C LEN(filmCollection) - 1. This expression will give the index of the last element in the array filmCollection, as array indexing typically starts at 0.

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

Answer

The pseudo-code statement to update the antMan record would be:

antMan.beingShown ← True

This indicates that the film is currently being shown at the cinema.

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;