AP CSP - Standard 3 Review

AP CSP - Standard 3 Review

12th Grade

33 Qs

quiz-placeholder

Similar activities

SKT5 : Bab 3 : c) Standard Library, Subaturcara, Tatasusunan

SKT5 : Bab 3 : c) Standard Library, Subaturcara, Tatasusunan

10th - 12th Grade

35 Qs

Project STEM AP CS A Unit 1

Project STEM AP CS A Unit 1

9th - 12th Grade

34 Qs

Python Functions Review Quiz

Python Functions Review Quiz

9th - 12th Grade

28 Qs

Java test 02

Java test 02

1st - 12th Grade

30 Qs

AP CS A Midterm Review

AP CS A Midterm Review

9th - 12th Grade

37 Qs

JavaScript Control Flow and Loops.

JavaScript Control Flow and Loops.

10th Grade - University

35 Qs

JavaScript Coding

JavaScript Coding

7th Grade - University

30 Qs

Computer Pretest1(Python Grade7_t1)

Computer Pretest1(Python Grade7_t1)

3rd Grade - University

30 Qs

AP CSP - Standard 3 Review

AP CSP - Standard 3 Review

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Kelly Challand

Used 4+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?