
AP CSP Variables, Conditionals, and Functions
Authored by Kelsey Rasmussen
Computers
12th Grade
Used 12+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the different data types in AP CSP?
float, boolean, char, and string
integer, float, boolean, char, and array
integer, double, boolean, char, and string
integer, float, boolean, and string
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write a conditional statement in AP CSP?
Use the 'unless' keyword followed by a condition in parentheses, and then a block of code to be executed if the condition is true.
Use the 'if' keyword followed by a condition in parentheses, and then a block of code to be executed if the condition is true. Optionally, use the 'else' keyword to specify a block of code to be executed if the condition is false.
Use the 'when' keyword followed by a condition in parentheses, and then a block of code to be executed if the condition is true.
Use the 'for' keyword followed by a condition in parentheses, and then a block of code to be executed if the condition is true.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is variable scope in AP CSP?
Variable scope refers to the color of the variable.
Variable scope refers to the part of the program where a variable is accessible.
Variable scope refers to the size of the variable.
Variable scope refers to the shape of the variable.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this expression evaluate to:
9 MOD 4
also written as 9 % 4
0
1
2
4
9
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this expression evaluate to:
3 MOD 15
also written as
3 % 15
0
3
5
15
6.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
What is the value of 15 MOD 3? This may also be written as 15 % 3
0
5
3
error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Give an example of a conditional statement in AP CSP.
switch statement
while loop
for loop
if statement
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?