WorksheetsAP CSP Unit 1 Exam Review
Total questions: 20
Worksheet time: 10mins
Parameters in Functions
Allow input to a function.
Define the output of a function.
Control the flow of a program.
Store data in a variable.
Correct Pseudocode
Uses FUNCTION name().
Uses METHOD name().
Uses PROCEDURE name().
Uses ROUTINE name().
Order of Operations
2*3+1 = 5
2*3+1 = 6
2*3+1 = 7
2*3+1 = 8
Data Types: Boolean
TRUE
FALSE
NULL
UNDEFINED
Infinite Loop
Happens when the condition never changes.
Occurs when a program runs without stopping.
Is a loop that executes a fixed number of times.
Is a loop that can be exited using a break statement.
Events
signifies something that has happened, triggering a response, often in GUI (like button clicks), asynchronous programming (tasks completing), or threading (signaling).
a type of data structure used in programming.
a method for optimizing code performance.
a design pattern for organizing code.
Use of Lists
For collections of data.
For storing single values.
For organizing data in a linear fashion.
For creating complex data structures.
Loop Condition
When a loop condition changes to false.
When a loop condition is never checked.
When a loop condition never changes to false. It results into an infinite loop.
When a loop condition is always true.
Boolean
Stores TRUE/FALSE.
Stores numerical values.
Stores text strings.
Stores date values.
Events
Actions that trigger code: clicking, key press, timer finishing, etc.
Static occurrences that do not change over time.
Visual elements that enhance user experience.
Background processes that run without user interaction.
Computing Innovations
Any device/software using computing.
A type of hardware that only performs calculations.
A method of storing data without using computers.
A programming language used for web development.
Pseudocode
A programming language with strict syntax.
A way to express logic without worrying about syntax.
A method for debugging code.
A type of markup language.
Digital Data
Uses bits.
Uses bytes.
Uses pixels.
Uses characters.
Repeat Until False
Requires a loop & Boolean condition.
Uses a single iteration without conditions.
Is a method for sorting data.
Is a type of error handling.
Lists
Indexed starting at 0.
Indexed starting at 1.
Indexed starting at -1.
Not indexed at all.
Parameters
variables defined within the parentheses of a function or method definition
the return values of a function
the data types of variables in a program
the names of functions in a program
Data Types: List
Ordered collection of values → ["red","blue","green"]
Unordered collection of values → ["red","blue","green"]
A single value → "red"
A collection of unique values → ["red","blue","green"]
Robot Impacts
Society both positively & negatively.
Society only positively.
Society only negatively.
Society has no impact.
Assignment
x = 5
x = 2
x = x + 3
x = 3
Iteration
Repeating instructions (loops).
A method of sorting data.
A technique for debugging code.
A way to optimize performance.
