AP COMP SCI

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

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:36 AM on 11/20/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

23 Terms

1
New cards

What is a procedure in programming?

A named group of programming instructions that may have parameters and return values.

2
New cards

What are parameters in a procedure?

Input variables of a procedure.

3
New cards

What do arguments specify when a procedure is called?

The values of the parameters.

4
New cards

What is testing in programming?

Using defined inputs to ensure that an algorithm or program is producing the expected outcomes.

5
New cards

What is a code statement?

A part of program code that expresses an action to be carried out.

6
New cards

What can an expression consist of?

A value, a variable, an operator, or a procedure call that returns a value.

7
New cards

What is program input?

Data sent to a computer for processing by a program.

8
New cards

What are events in programming?

Actions that supply input data to a program.

9
New cards

How do you define a function in Python?

By writing: def functionName(parameter1, parameter2, ...):

10
New cards

What is necessary when calling a function?

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

11
New cards

Where does Python inform you of any errors?

In the console.

12
New cards

What is a syntax error?

A mistake in the program where the rules of the programming language are not followed.

13
New cards

What is a runtime error?

A mistake that occurs during the execution of a program.

14
New cards

What is a logical error?

A mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly.

15
New cards

What tip can help with debugging errors?

Look at the line numbers provided by the console.

16
New cards

When is onMousePress(mouseX, mouseY) called?

Every time the mouse is clicked.

17
New cards

What does c = Circle(200, 200, 100, fill='red') do?

Stores a red circle in the variable c.

18
New cards

What property changes the color of a circle?

c.fill.

19
New cards

What is the purpose of custom properties?

To store specific values that belong to a specific shape.

20
New cards

What do you use if statements for?

To test conditions and run code if the condition is true.

21
New cards

What is the difference between if and elif statements?

If tests a condition, elif is used for multiple conditions to check if only one is true.

22
New cards

What is the role of a method in programming?

A function that works specifically with objects.

23
New cards

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

Tests whether a point is hitting that shape.

Explore top flashcards