
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
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
12 questions
Dividing Polynomials--Long Division
Presentation
•
9th - 12th Grade
13 questions
Types of Chemical Reactions
Presentation
•
9th - 12th Grade
13 questions
Properties of Parallelograms
Presentation
•
9th - 12th Grade
13 questions
El alfabeto/Abecedario
Presentation
•
9th - 12th Grade
13 questions
Theme Review
Presentation
•
9th - 12th Grade
13 questions
Part 2 Mastering Microsoft PowerPoint
Presentation
•
9th - 12th Grade
11 questions
Long & Short Term Goals
Presentation
•
9th - 12th Grade
11 questions
Origin of Life - Scientific Contributions
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade