Skip to content

Course home

Data structures

Data structures

EasyMedium
1234567891011121314151617181920212223
Question 19

An algorithm, written using pseudo-code, utilizes a RECORD data structure to store information about video games.

RECORD Game
    title : String
    genre : String
    rating : Real
    isReleased : Boolean
ENDRECORD

portal ← Game('Portal', 'Puzzle', 9.5, True)
minecraft ← Game('Minecraft', 'Sandbox', 9.0, True)
hades ← Game('Hades', 'Roguelike', 9.0, True)
gameLibrary ← [portal, minecraft, hades]
maxRating ← 0.0
position ← 0

FOR i ← 0 TO 2
    IF gameLibrary[i].rating > maxRating THEN
        maxRating ← gameLibrary[i].rating
        position ← i
    ENDIF
ENDFOR

OUTPUT gameLibrary[position].title, ' has the highest rating'

Which assignment statement changes the rating of the game Minecraft to 9.5?

A

minecraft.rating ← 9.5

B

gameLibrary[0].rating ← 9.5

C

Game(rating) ← 9.5

D

minecraft(rating) ← 9.5

Markscheme

Data structures Questions

  1. GCSE
  2. /Computer Science
  3. /Data structures

36 exam-style questions on AQA GCSE Computer Science Data structures. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank