
CMU CS Python Rectangles, Colors and borders.
Presentation
•
Computers
•
9th - 12th Grade
•
Easy
Maria Cruz Farooqi
Used 2+ times
FREE Resource
4 Slides • 11 Questions
1
CMU CS Academy
Replace this with a sub-header that can be in multiple lines.
Duplicate this text as many times as you would like.
2
The Canvas
To understand what is going on, we first have to talk about the canvas. In this course, all drawing is done on a canvas.
The canvas is made up of tiny colored points, or pixels. We use (x,y) coordinates to talk about pixels on the canvas, like so:
(0, 0) is the left-top corner of the canvas (not the middle!).
As x increases, you head right.
As y increases, you head down, not up!
Our canvas is a 400 x 400 square, so (200, 200) is the middle of the canvas, and (400, 400) is the right-bottom corner.
3
As x increases, you head right.
As y increases, you head down, not up!
Our canvas is a 400 x 400 square, so (200, 200) is the middle of the canvas, and (400, 400) is the right-bottom corner.
(200, 200)
(400, 400)
4
Multiple Choice
Which one is near (0, 0) ?
A
B
C
D
5
Multiple Choice
Which one is near (400, 0) ?
A
B
C
D
6
Multiple Choice
Which one is near (400, 200) ?
A
B
C
D
7
Multiple Choice
Which one is near (400, 400) ?
A
B
C
D
8
Python is very picky. Here are some rules to follow:
Case matters, so Rect is not the same as rect.
A command must have the right number of values after it.
For Rect, that's left, top, width, and height. These values are called arguments. Here are some rules about arguments:
They must be in the right order.
They must be inside parentheses.
They must be separated by commas.
If any of these rules are not followed, you have an error, and your code will not run correctly until you fix the error.
9
Drag and Drop
10
Drag and Drop
Rect (0,200,100,200)
Rect (200,200, 200,200)
11
Drag and Drop
12
Multiple Choice
The order in which we draw shapes matters. Each new shape is drawn on top of all the previous shapes. Which code is in the correct order?
Rect(0, 0, 100, 100, fill='orange')
Rect(50, 50, 100, 100, fill='lime')
Rect(50, 50, 100, 100, fill='lime')
Rect(0, 0, 100, 100, fill='orange')
13
Multiple Choice
The order in which we draw shapes matters. Each new shape is drawn on top of all the previous shapes. Which code is in the correct order?
Rect (40,20,160,160, fill="dodgerBlue")
Rect(120,100,160,200, fill="lightGreen")
Rect (200,220,160,160, fill="dodgerBlue")
Rect(0,0,400,400,fill="lightSalmon")
Rect(0,0,400,400,fill="lightSalmon")
Rect (40,20,160,160, fill="dodgerBlue")
Rect(120,100,160,200, fill="lightGreen")
Rect (200,220,160,160, fill="dodgerBlue")
14
Drag and Drop
15
Dropdown
CMU CS Academy
Replace this with a sub-header that can be in multiple lines.
Duplicate this text as many times as you would like.
Show answer
Auto Play
Slide 1 / 15
SLIDE
Similar Resources on Wayground
9 questions
Domain 2 Lesson 2
Presentation
•
9th - 12th Grade
12 questions
ÔN 12 CÂU TRẮC NGHIỆM TIN 9-HK1
Presentation
•
9th - 12th Grade
12 questions
CMU CS Academy 2.2.4 and 2.2.5
Presentation
•
9th - 12th Grade
10 questions
Bài 12: THUẬT TOÁN, CHƯƠNG TRÌNH MÁY TÍNH
Presentation
•
KG - University
13 questions
CMU CS Academy 2.3.1 General Shape Properties
Presentation
•
9th - 12th Grade
10 questions
Simplifying Radicals
Presentation
•
9th - 11th Grade
11 questions
Ser vs. Estar
Presentation
•
9th - 12th Grade
11 questions
4/8 Simplifying Radicals with variables
Presentation
•
9th - 11th 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