AP Computer Science Principles Unit 4 questions and
answers with solutions
The program will be easier for people to read - ANSWER A benefit of using well-named
functions and parameters in a computer program is
defining a function - ANSWER When you name groupings of programming instructions and help
people better understand programs, condense code to make quick and more efficient, you are
doMath(5); - ANSWER What is the correct way to call the function called "doMath" with a
parameter of 5?
Drawing out the letters of a word - ANSWER Which of the following would best be accomplished
by a function?
Opacity - ANSWER of an object can be changed in the properties tab to create "appearing" or
"disappearing" effects.
false - ANSWER High level programming is a programming language that captures only the most
primitive operations available to a machine.
Top-down design - ANSWER a problem solving approach in which you break down a system to
gain insight into the sub-systems that make it up
Algorithm - ANSWER list of steps that you can follow to finish a task
true - ANSWER Compared to the number of words in a natural language, the number of defined
words in a programming language is very small.
, false - ANSWER Programming languages have more "words" than natural languages
false - ANSWER true or false: Abstraction is a group of code that you can easily call over and
over again
- Makes the program easier to read
- Avoid retyping the same lines of code - ANSWER Why do we use functions in programs
abstraction - ANSWER Writing a function for code you repeat often is an example of an.......
true - ANSWER true or false: two different functions in a program could contain the same code
efficiency - ANSWER Getting things done with the least amount of time and resources is
Regarding programming documentation - ANSWER It helps during initial program development
and also when modifications are made
Parameters allow for more flexible, generalized behaviors in functions. - ANSWER Why are
parameters useful when programming?
loop - ANSWER Drawing 100 tiny dots, the best method is
Programmers can use functions created by their partners, relying on the functionality without
needing to know the specific details of how the function is implemented. - ANSWER When
programmers work together, what is an example of how abstraction in programming can
promote collaboration?
answers with solutions
The program will be easier for people to read - ANSWER A benefit of using well-named
functions and parameters in a computer program is
defining a function - ANSWER When you name groupings of programming instructions and help
people better understand programs, condense code to make quick and more efficient, you are
doMath(5); - ANSWER What is the correct way to call the function called "doMath" with a
parameter of 5?
Drawing out the letters of a word - ANSWER Which of the following would best be accomplished
by a function?
Opacity - ANSWER of an object can be changed in the properties tab to create "appearing" or
"disappearing" effects.
false - ANSWER High level programming is a programming language that captures only the most
primitive operations available to a machine.
Top-down design - ANSWER a problem solving approach in which you break down a system to
gain insight into the sub-systems that make it up
Algorithm - ANSWER list of steps that you can follow to finish a task
true - ANSWER Compared to the number of words in a natural language, the number of defined
words in a programming language is very small.
, false - ANSWER Programming languages have more "words" than natural languages
false - ANSWER true or false: Abstraction is a group of code that you can easily call over and
over again
- Makes the program easier to read
- Avoid retyping the same lines of code - ANSWER Why do we use functions in programs
abstraction - ANSWER Writing a function for code you repeat often is an example of an.......
true - ANSWER true or false: two different functions in a program could contain the same code
efficiency - ANSWER Getting things done with the least amount of time and resources is
Regarding programming documentation - ANSWER It helps during initial program development
and also when modifications are made
Parameters allow for more flexible, generalized behaviors in functions. - ANSWER Why are
parameters useful when programming?
loop - ANSWER Drawing 100 tiny dots, the best method is
Programmers can use functions created by their partners, relying on the functionality without
needing to know the specific details of how the function is implemented. - ANSWER When
programmers work together, what is an example of how abstraction in programming can
promote collaboration?