1/22
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is a procedure in programming?
A named group of programming instructions that may have parameters and return values.
What are parameters in a procedure?
Input variables of a procedure.
What do arguments specify when a procedure is called?
The values of the parameters.
What is testing in programming?
Using defined inputs to ensure that an algorithm or program is producing the expected outcomes.
What is a code statement?
A part of program code that expresses an action to be carried out.
What can an expression consist of?
A value, a variable, an operator, or a procedure call that returns a value.
What is program input?
Data sent to a computer for processing by a program.
What are events in programming?
Actions that supply input data to a program.
How do you define a function in Python?
By writing: def functionName(parameter1, parameter2, ...):
What is necessary when calling a function?
You must have exactly as many arguments as parameters, and in the correct order.
Where does Python inform you of any errors?
In the console.
What is a syntax error?
A mistake in the program where the rules of the programming language are not followed.
What is a runtime error?
A mistake that occurs during the execution of a program.
What is a logical error?
A mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly.
What tip can help with debugging errors?
Look at the line numbers provided by the console.
When is onMousePress(mouseX, mouseY) called?
Every time the mouse is clicked.
What does c = Circle(200, 200, 100, fill='red') do?
Stores a red circle in the variable c.
What property changes the color of a circle?
c.fill.
What is the purpose of custom properties?
To store specific values that belong to a specific shape.
What do you use if statements for?
To test conditions and run code if the condition is true.
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.
What is the role of a method in programming?
A function that works specifically with objects.
What does shape.hits(mouseX, mouseY) do?
Tests whether a point is hitting that shape.