Arrays

QuizÂ by GCSE Computer Science Teacher 4

GCSE (AQA)
Computer Science
English National Curriculum

Feel free to use or edit a copy

includes Teacher and Student dashboards

Measures 2 skills fromGCSE (AQA)Computer ScienceEnglish National Curriculum

3.2.6.b
3.2.6.a

Track each student's skills and progress in your Mastery dashboards

• edit the questions
• save a copy for later
• start a class game
• automatically assign follow-up activities based on studentsâ€™ scores
• assign as homework
• share a link with colleagues
• print as a bubble sheet

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

13 questions
• Q1
What is an array?
A large amount of data stored separately relating to each other
A large amount of data stored together relating to each other and it will be different data types
A large amount of data stored together relating to each other and it will be the same data type
A collection of variables separately storing data
45s
3.2.6.b
• Q2
What is the correct line of code to create an array of coin flips?
coin[0]
45s
3.2.6.b
• Q3
What is the difference between an array and 2d array?
An array can only store one data type, whereas a 2D array can store multiple data types
An array is a list of lists and be organised in a grid with rows and columns. Whereas, a 2D array is a list of data and it can be organised in a row
An array is a list of data and it can be organised in a row, whereas a 2d array is a list of lists and be organised in a grid with rows and columns
An array can store multiple data types, whereas a 2D array can only store one data type
60s
3.2.6.b
• Q4
Which line of code will output the first element in the array?
OUTPUT names-[1]
OUTPUT names[0]
OUTPUT names[1]
OUTPUT names
45s
3.2.6.b
• Q5
Which line of code will output the last element in the array?
OUTPUT names[last]
OUTPUT names
OUTPUT names[8]
OUTPUT names[-1]
45s
3.2.6.b
• Q6
What is the correct line of code to add True to the array?
coinFlip[0] <-- FALSE
coinFlip[0] FALSE
coinFlip[0] <-- TRUE
coinFlip[] <-- FALSE
45s
3.2.6.b
• Q7
What is the purpose of this code?
This program is using a for loop to add all of the times together which are stored in an array
This program is using a for loop to add all of the times together which are stored in an variable
This program is using a while loop to add all of the times together which are stored in an array
This will output every element in the array
60s
3.2.6.b
• Q8
What is the correct piece of a code to complete the program?
averageScore <-- averageScore + studentScores[i]
averageScore <-- averageScore + studentScores[0]
averageScore <-- averageScore - studentScores[i]
averageScore <-- studentScores[i] - studentScores[i]
60s
3.2.6.b
• Q9
Which line of code will successfully create this 2D array in pseudocode?
runners <-- [ 1.8, 2.0, 5.0, 2.5, 1.0, 3.0, 6.4, 0.5, 1.2]
runners <-- [ [1.8, 2.5, 6.4], [2.0, 1.0, 0.5], [5.0, 3.0, 1.2] ]
runners <-- [ [1.8, 2.0, 5.0], [2.5, 1.0, 3.0], [6.4, 0.5, 1.2]]
runners <-- [ 1.8, 2.0, 5.0], [2.5, 1.0, 3.0], [6.4, 0.5, 1.2]
60s
3.2.6.b
• Q10
Which time is going to be outputted with runners[0,1] ?
2.5
1.2
2.0
6.4
60s
3.2.6.b
• Q11
Which time is going to be outputted with runners[2,1] ?
6.4
0.5
3.0
1.2
60s
3.2.6.b
• Q12
Which line of code will replace runner 1, lap 1 with a new time of 1.5?
runners[0,1] <-- 1.5
runners[1,1] <-- 1.5
runners[1,0] <-- 1.5
runners[0,0] <-- 1.5
60s
3.2.6.b
• Q13
What is the correct line of code to complete this program?
totalTime <-- totalTime + runners[j]
totalTime <-- totalTime + runners[i]
totalTime <-- totalTime + runners[i][j]
totalTime <-- runners[i][j]
60s
3.2.6.a

Teachers give this quiz to your class