Test 7- APCSP with Verified Answers Rated A
procedure - -function when you know exactly which and how many - -
variable
selection - -conditional or if-else
when the number of values that need to - -list
lists - -array
if you dont know how many items you - -list
iteration - -loop or repeating
when you need to organise information - -list
instructions - -command or lines of code
when you have a piece of code - -functions
documentation - -comments
when you encapsulate a solution - -functions
label the star - -counter variable
when there is something you need to - -loops
label the heart - -conditional
when you need repetitive behavior - -loops
label the smiley face - -counter pattern
list - -generic term for an ordered collection of
elements
name one instance that would create a infinite loop -
-if counter pattern is missing, or if you forget i++
index - -a common method for referencing the
elements in a list or string using numbers
explain why loops are a good example of abstraction -
-gets rid of repeated code
element - -an individual value in a list that is
assigned a unique index
explain 2 reasons lists are a good example of abstraction
- -you only have to have 1 variable for each thing
and you do not have to know anything inside the list to length - -number of elements a list contains
use it
substring - -part of an existing string
in a few words as possible, explain how lists are scalable -
-append, insert, remove
algorithm - -a finite set of instructions that
accomplish a task
how can you tell the difference between a variable being
initialised with a value and when a list is being initialised?
- -brackets top-down design - -a problem solving approach in
which you break down the problem starting with the main
goal in mind
when you only need to store one value - -variable
1/2
procedure - -function when you know exactly which and how many - -
variable
selection - -conditional or if-else
when the number of values that need to - -list
lists - -array
if you dont know how many items you - -list
iteration - -loop or repeating
when you need to organise information - -list
instructions - -command or lines of code
when you have a piece of code - -functions
documentation - -comments
when you encapsulate a solution - -functions
label the star - -counter variable
when there is something you need to - -loops
label the heart - -conditional
when you need repetitive behavior - -loops
label the smiley face - -counter pattern
list - -generic term for an ordered collection of
elements
name one instance that would create a infinite loop -
-if counter pattern is missing, or if you forget i++
index - -a common method for referencing the
elements in a list or string using numbers
explain why loops are a good example of abstraction -
-gets rid of repeated code
element - -an individual value in a list that is
assigned a unique index
explain 2 reasons lists are a good example of abstraction
- -you only have to have 1 variable for each thing
and you do not have to know anything inside the list to length - -number of elements a list contains
use it
substring - -part of an existing string
in a few words as possible, explain how lists are scalable -
-append, insert, remove
algorithm - -a finite set of instructions that
accomplish a task
how can you tell the difference between a variable being
initialised with a value and when a list is being initialised?
- -brackets top-down design - -a problem solving approach in
which you break down the problem starting with the main
goal in mind
when you only need to store one value - -variable
1/2