Lesson details

Key learning points

  1. In this lesson, we will use what we have learnt about 2D lists in previous lessons to complete a challenging project.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

3 Questions

Q1.
What will the output be when this program is executed?
An image in a quiz
Fred
Correct answer: Fred, Wilma, Dino
Fred, Wilma, Dino, 4, 5, 6
scores[0]
Q2.
If the user enters Bob when prompted, what will be the output?
An image in a quiz
{answer}'s score is {score}
5
Correct answer: Bob’s score is 5
Error: index out of range
Q3.
Is this a definition for a 2D array or a 2D list? A __________ must be a predefined fixed size and each item held must be of the same data type.
Correct answer: 2D array
2D list

3 Questions

Q1.
Work out all of the possible ways that you can win at noughts and crosses. Write the total number below:
10
15
4
Correct answer: 8
Q2.
True or False: A function always returns a value.
False
Correct answer: True
Q3.
A 2D list is created for a noughts and crosses board. What code will be needed to assign a value to location 5?
An image in a quiz
Correct answer: [1][1]
[1][5]
[2][2]
[2][5]