
4. Communicating with Light
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Jason King
Used 6+ times
FREE Resource
6 Slides • 10 Questions
1
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
5
Fill in the Blanks
Write down the import statement needed to control the light matrix in a Python program.
Type answer...
6
7
8
Multiple Choice
from hub import light_matrix
What is the purpose of the first line in the code?
To create a new light matrix
To delete an existing light matrix
To import the light matrix module from the hub package
To initialize the light matrix with default settings
9
Multiple Choice
import runloop (line 2)
Why do we import runloop in this program?
To create a continuous loop
To use specific functions that control program flow
To import all possible loops
To make the program run faster
10
Multiple Choice
async def main(): (line 4)
What does the 'async' keyword indicate in this function definition?
The function runs synchronously
The function is a main function
The function will exit immediately
The function is asynchronous
11
12
Multiple Choice
light_matrix.show_image(light_matrix.IMAGE_HEART) (line 6)
What will happen when this line of code is executed?
The light matrix will turn off all lights
The light matrix will display an image of a Heart
The light matrix will print "IMAGE_HEART" as text
The light matrix will clear any images
13
Multiple Choice
line 7
What is the function of 'await runloop.sleep_ms(5000)' in this code?
It causes the program to terminate after 5000 milliseconds
It creates a new thread that sleeps for 5000 milliseconds
It delays the execution of the subsequent line of code for 5000 milliseconds
It repeats the previous line of code every 5000 milliseconds
14
Multiple Choice
line 8
light_matrix.clear()
What does light_matrix.clear() do in this context?
It turns off all the lights in the light matrix
It clears the memory of the light matrix
It resets the light matrix to its default image
It prepares the light matrix for a new program
15
Multiple Choice
line 9
Why do we call runloop.run(main()) at the end of the script?
To compile the program
To execute the main function asynchronously
To enter an infinite loop
To test the main function without running it
16
Show answer
Auto Play
Slide 1 / 16
SLIDE
Similar Resources on Wayground
10 questions
Vocabulary in Context
Presentation
•
9th - 12th Grade
11 questions
Music Theory Review
Presentation
•
9th - 12th Grade
9 questions
D3L3: Describe Permissions
Presentation
•
9th - 12th Grade
10 questions
Domain and Range Lesson
Presentation
•
9th - 12th Grade
10 questions
Earth Sciences: Plate Boundaries
Presentation
•
9th - 12th Grade
10 questions
Sum & Difference of Cubes
Presentation
•
9th - 12th Grade
10 questions
Six Trig Functions
Presentation
•
9th - 12th Grade
12 questions
Simple Probability Lesson
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
6 questions
PRIDE Always and Everywhere
Presentation
•
12th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
26 questions
KOR Review Kahoot Questions
Quiz
•
8th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
12 questions
Unit Zero lesson 2 cafeteria
Presentation
•
9th - 12th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
10 questions
Riddles Riddles fun Riddles
Quiz
•
6th - 12th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade