Year 11
These resources will be removed by end of Summer Term 2025.
Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.
Lesson details
Key learning points
- In this lesson, we will learn about 2D arrays and lists. We will discover new syntax for creating and using them in our programs.
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 are the three possible outputs from this program when it is executed? [SELECT THREE]
All pixels will be switched off
Each pixel in the grid will be a random colour from a choice of red, yellow or blue
Q2.
Which of these is the correct import statement for importing the sense hat module?
from sense_hat import sensehat
from Sense_Hat import SenseHat
from Sense_HAT import SenseHAT
Q3.
If you want a block of code to repeat forever, what statement should you use?
repeat forever:
repeat Forever:
while true:
3 Questions
Q1.
What will the output be when this program is executed?
Fred
Fred, Wilma, Dino, 4, 5, 6
scores[0]
Q2.
If the user enters Bob when prompted, what will be the output?
{answer}'s score is {score}
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.
2D list