APCSP 1.7-1.9 TEST QUESTIONS AND
ANSWERS
comment
A way for you to leave notes about what your code is doing in plain
English, so other people can understand it.
why comment?
Code is run by computers ... but read by other people.
Comments help others (and you!) understand your code.
preconditions
What assumptions we make and what must be true before the function
is called.
postconditions
What should be true after the function is called
single line comment
#this is used for...
multi-line comment
"""this is
used for"""
ambiguous
unclear; open to more than one interpretation
abstraction
Managing complexity by "abstracting away" information and detail, in
order to focus on the relevant concepts
high level abstraction
Cover a broader range of possible objects or events without describing
them in much detail
low level abstraction
Highly specific statements that refer to observable objects or events
procedural abstraction
Defining the steps of a program without worrying about exactly how each
step works under the hood
python
High-level programming language example
assembly
ANSWERS
comment
A way for you to leave notes about what your code is doing in plain
English, so other people can understand it.
why comment?
Code is run by computers ... but read by other people.
Comments help others (and you!) understand your code.
preconditions
What assumptions we make and what must be true before the function
is called.
postconditions
What should be true after the function is called
single line comment
#this is used for...
multi-line comment
"""this is
used for"""
ambiguous
unclear; open to more than one interpretation
abstraction
Managing complexity by "abstracting away" information and detail, in
order to focus on the relevant concepts
high level abstraction
Cover a broader range of possible objects or events without describing
them in much detail
low level abstraction
Highly specific statements that refer to observable objects or events
procedural abstraction
Defining the steps of a program without worrying about exactly how each
step works under the hood
python
High-level programming language example
assembly