Search Header Logo
4. Communicating with Light

4. Communicating with Light

Assessment

Presentation

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Jason King

Used 6+ times

FREE Resource

6 Slides • 10 Questions

1

media

2

Open Ended

  • 1. Open your ClassNotebook application. 

  • 2. In the Content Library, navigate to the "Unit 1" section. 

  • 3. Locate the page titled "5x5 Matrix." 

  • 4. Copy the entire "5x5 Matrix" page. 

  • 5. Paste it into your personal "Class Notes" section. 

  • 6. Use the shading feature to fill in cells on the matrix and create your image. To shade a cell, left-click on it and select the shading option. 

  • 7. Once your image is complete, take a screenshot of your matrix. 

  • 8.Paste the screenshot as your answer. 

3

Open Ended

Consider the individual steps involved in lighting up each cell of a 5x5 matrix to form your image. 

Write the pseudocode for your image.

Remember, pseudocode is not actual code; it’s a plain-language description of the steps the computer needs to follow. 

4

media

5

Fill in the Blanks

Type answer...

6

media

7

media

8

Multiple Choice

Question image

from hub import light_matrix 
What is the purpose of the first line in the code?

1

To create a new light matrix 

2

To delete an existing light matrix 

3

To import the light matrix module from the hub package 

4

To initialize the light matrix with default settings 

9

Multiple Choice

Question image

import runloop (line 2)
Why do we import runloop in this program? 

1

To create a continuous loop 

2

To use specific functions that control program flow 

3

To import all possible loops 

4

To make the program run faster 

10

Multiple Choice

Question image

async def main(): (line 4)
What does the 'async' keyword indicate in this function definition? 

1

The function runs synchronously 

2

The function is a main function 

3

The function will exit immediately 

4

The function is asynchronous

11

media

12

Multiple Choice

Question image

light_matrix.show_image(light_matrix.IMAGE_HEART) (line 6)

What will happen when this line of code is executed?

1

The light matrix will turn off all lights 

2

The light matrix will display an image of a Heart

3

The light matrix will print "IMAGE_HEART" as text 

4

The light matrix will clear any images 

13

Multiple Choice

Question image

line 7
What is the function of 'await runloop.sleep_ms(5000)' in this code? 

1

It causes the program to terminate after 5000 milliseconds 

2

It creates a new thread that sleeps for 5000 milliseconds 

3

It delays the execution of the subsequent line of code for 5000 milliseconds 

4

It repeats the previous line of code every 5000 milliseconds 

14

Multiple Choice

Question image

line 8
light_matrix.clear()

What does light_matrix.clear() do in this context?

1

It turns off all the lights in the light matrix 

2

It clears the memory of the light matrix 

3

It resets the light matrix to its default image 

4

It prepares the light matrix for a new program 

15

Multiple Choice

Question image

line 9

Why do we call runloop.run(main()) at the end of the script?

1

To compile the program 

2

To execute the main function asynchronously 

3

To enter an infinite loop 

4
  • To test the main function without running it 

16

media
media

Show answer

Auto Play

Slide 1 / 16

SLIDE