AP CSP Test #1 Flashcards
when flag is clicked…
event-driven programming
tabs: motion/variables
palettes
white boxes/drop-downs
parameters
what do we put inside of parameters?
input
procedure
a named sequence of instructions that may have parameters to leave input and may return a value
types of procedures
“reporter” & “command” blocks
reporter blocks
ovals, & RETURN/report a value, “gossip”
command blocks
have a puzzle shape, tells the computer to do something
string
a sequence of characters, items in a list
substrings
piece of already existing string, “Hanna,” “anna”, and “nnah” are each substrings of the string “Hannah.”
concatenate
make a bigger string by connecting two or more
if-else statement
a selection statement.
It’s called “selection” because, if whatever is in the space is true, the code in the top section gets selected and is executed. But if whatever is in the space is false, the code in the bottom section gets selected and is executed!
FLOWCHART: oval
the start or end of the algorithim
FLOWCHART: rectangle
process (an action step: move __)
FLOWCHART: diamond
Condition, true? false?
FLOWCHART: rhombus
message gets displayed, like say, “!”
iteration
repeat-until statement
repeat statement
what block is NOT considered iteration
the forever block is NOT considered iteration, there is no stopping condition!
algorithim
sequence of statements
procedures/functions/methods
may have parameters or return values
getting “Called”
When a procedure gets executed as part of an algorithm, it’s sometimes said that the procedure gets “called”.
Procedural abstraction
reduce complexity
Hiding all the “details” of how a pinwheel gets drawn.
Helping make your code easier to read and understand.
Eliminating the need to copy and paste the same code over and over!
abstraction by generalization
Wrote a single procedure that includes the shared features, and used a parameter to handle the differences.