apcsp

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/40

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

41 Terms

1
New cards

What do functions take?

It takes inputs and runs codes using those inputs.

2
New cards

How do you define a function?

def function name (parameter1, parameter2…).

3
New cards

What are parameters?

Input variables of a function.

4
New cards

All code inside your function must be indented below your function definition.

True

5
New cards

You can call a function with arguments after it is defined.

True

6
New cards

What is an argument?

Arguments specify the values of the parameters when a function is called.

7
New cards

You must have exactly as many arguments as parameters, and in the correct order.

True

8
New cards

What is a console?

The console is where python informs you of any errors in your code.

9
New cards

What is a syntax error?

A syntax error is a mistake in the program where the rules of the programming language are not followed.

10
New cards

What is a runtime error?

A runtime error is a mistake in the program that occurs during execution.

11
New cards

What is a logical error?

A logical error is a mistake that causes the program to behave incorrectly or unexpectedly.

12
New cards

When is onMousePress(mouseX, mouseY) called?

It is called every time the mouse is clicked.

13
New cards

When is onMouseRelease(mouseX, mouseY) called?

It is called when the mouse is released.

14
New cards

What point is (mouseX, mouseY)?

It is the point where the mouse is clicked

15
New cards

What is the variable? c = Circle(200, 200, 100, fill='red')

c

16
New cards

What does this do? c.fill='blue'

It changes the color to blue.

17
New cards

All shapes have which position properties?

left, right, top, bottom, centerX, centerY

18
New cards

All shapes have these size properties.

width and height

19
New cards

borderWidth

positive numbers only

20
New cards

opacity

numbers between 0 and 100

21
New cards

dashes

True or False

22
New cards

fill and border

properties that change color

23
New cards

What can you use with rotate angle?

numbers only

24
New cards

What do you put after visible to see if it is true or false?

true, false

25
New cards

What are custom properties?

Custom properties are variables that belong to a specific shape.

26
New cards

What is myPerson.hunger = 50 creating?

A custom property for your myPerson shape.

27
New cards

Use if (condition): and indent code

True

28
New cards

Use else: after an if statement

True

29
New cards

x == y

Is x equal to y?

30
New cards

x != y

Is x not equal to y?

31
New cards

x < y

Is x less than y?

32
New cards

x > y

Is x greater than y?

33
New cards

x <= y

Is x less than or equal to y?

34
New cards

x >= y

Is x greater than or equal to y?

35
New cards

What does elif do?

It lets you have more than one condition to check.

36
New cards

elif requires an if statement first

True

37
New cards

Are shapes a type of object?

Yes

38
New cards

In app.background and app.stop(), what are the objects?

app

39
New cards

What does shape.toFront() do?

Moves that shape to the top layer.

40
New cards

What does shape.hits(mouseX, mouseY) do?

Tests whether a point is hitting the shape; returns True or False.

41
New cards

What does shape.hitsShape(otherShape) do?

Tests whether that shape is hitting another shape