CMU: Unit 4

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/10

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:36 PM on 2/13/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

11 Terms

1
New cards

if statement

Used to initiate conditional logic.

2
New cards

elif

Short for 'else if', allows for an additional test that executes if the initial if condition is false.

3
New cards

else statement

Runs if all previous conditions (if and any elif) are false.

4
New cards

onKeyPress

Event handler triggered when a key is pressed down.

5
New cards

onKeyRelease

Event handler that allows code execution when the user releases a key.

6
New cards

addPoint(x, y)

Exclusively available for polygons, adds a point to the defined polygon based on coordinates.

7
New cards

contains(x, y)

Returns whether the specified shape includes the point defined by the coordinates, returning a boolean value.

8
New cards

hits(x, y)

Returns True if the point lies within the borders of the shape that is drawn at that location.

9
New cards

shape1.hitsShape(shape2)

Tests for a collision or intersection between two shapes.

10
New cards

shape1.containsShape(shape2)

Tests if the first shape completely encloses the second shape.

11
New cards

app.stop()

Terminates further event handling, effectively stopping the application from processing any more events.