
AP CSP - Standard 3 Review
Authored by Kelly Challand
Computers
12th Grade
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
33 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following JavaScript code snippet:
function start() {
var x = 5;
quadrupleNumber(x);
}
function quadrupleNumber(x) {
var quadX = 4 * x;
console.log(quadX);
}What will be the output when the start function is invoked?
No output, there is a syntax error in the code.
20
15
10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the benefits of writing functions in programming?
To make our code reusable across different parts of the program
To enhance code readability by assigning a descriptive name to a set of instructions
To eliminate the need for writing repetitive code
All of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Identify the parameter in the function definition of quadrupleNumber below:
function quadrupleNumber(x){
var quadX = 4 * x;
println(quadX); }
There is no parameter
quadX
println
x
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Identify the parameters used in the printNumbers function from the following code snippet:
function printNumbers(first, second, third){
println(first);
println(second);
println(third); }
printNumbers
println
x, y, z
first, second, third
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code snippet. What will be the output when it is executed?
function printNumbers(first, second, third){
println(first);
println(second);
println(third);
}
function start(){
var middle = 5; printNumbers(4, middle, 6);
}
4
middle
6
4middle6
4
5
6
456
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To draw a circle using the drawCircle function at coordinates (300, 400) with a radius of 40 and the color blue, which function call is correct?
Here’s the function signature for reference:
function drawCircle(radius, color, x, y)
drawCircle(radius, color, x, y);
drawCircle(40, Color.blue, 300, 400);
drawCircle(300, 400, Color.blue, 40);
drawCircle(300, 400, 40, Color.blue);
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Is it mandatory for functions to have parameters in programming?
Yes, functions must always have parameters.
No, functions can exist without parameters.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?