
CMU CS Academy 2.2.4 and 2.2.5
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Easy
Maria Cruz Farooqi
Used 4+ times
FREE Resource
2 Slides • 10 Questions
1
CMU CS Academy 2.2.4 and 2.2.5
Variables and Mouse Release Events
By Maria Cruz Farooqi
Learning Target:
I can identify and utilize global and local variables to modify the properties of a shape in a graphical program.
I can use Python to change shapes when I release the mouse and explain what happens when I press and release the mouse in different ways.
2
Drag and Drop
3
Multiple Choice
How can we be sure that there are 2 circles after we click the mouse in the previous example?
We cannot. There is no way to tell.
The Inspector shows one point with two colors.
Both a red and a blue circle are clearly visible.
The circle is purple, because it combines blue and red.
4
Dropdown
5
Dropdown
See how the circle
6
Dropdown
Unlike local variables, global variables can be used anywhere, inside or outside any function. That is why we can use c inside
7
Multiple Choice
Which variables are local, and which are global, in the previous example?
x and y are local, and c is global.
They are all local.
They are all global.
c is local, and x and y are global.
8
Drag and Drop
onMouseRelease
When you press the mouse down, eventually you stop 9
Dropdown
10
Multiple Choice
In the previous example, what happens if you press the mouse and immediately release it (without moving it)? Try it first before answering.
We get two circles -- a navy circle drawn directly over a gold circle.
The code crashes if we do that.
We get only one circle -- the gold circle becomes navy.
There is no way to tell if we have one or two circles.
11
Dropdown
12
Your Turn: Go to CMU CS Academy and finish the lessons, Checkpoints, and Exercises.
CMU CS Academy 2.2.4 and 2.2.5
Variables and Mouse Release Events
By Maria Cruz Farooqi
Learning Target:
I can identify and utilize global and local variables to modify the properties of a shape in a graphical program.
I can use Python to change shapes when I release the mouse and explain what happens when I press and release the mouse in different ways.
Show answer
Auto Play
Slide 1 / 12
SLIDE
Similar Resources on Wayground
11 questions
Must and Mustn't
Presentation
•
9th - 12th Grade
8 questions
MLA Format In Text Citations
Presentation
•
9th - 12th Grade
10 questions
9/11
Presentation
•
9th - 12th Grade
10 questions
Authentication and Control part 1
Presentation
•
9th - 12th Grade
10 questions
AP CSP 4.1 The Internet
Presentation
•
9th - 12th Grade
10 questions
Coding in Kindergarten 2023
Presentation
•
KG
9 questions
Science Parent Letter
Presentation
•
9th - 12th Grade
9 questions
05-25 Security Best Practices
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade