
AP CSP 3.1 (Variables)
Authored by Herman Galioulline
Computers
9th - 12th Grade
Used 88+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The variable age is to be used to represent a person’s age, in years. Which of the following is the most appropriate data type for age?
boolean
number
string
list
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The variable isOpen is to be used to indicate whether or not a store is currently open. Which of the following is the most appropriate data type for isOpen?
boolean
number
string
list
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
A teacher is writing a code segment that will use variables to represent a student’s name and whether or not the student is currently absent. Which of the following variables are most appropriate for the code segment?
A string variable named s and a Boolean variable named a
A string variable named s and a numeric variable named n
A string variable named studentName and a Boolean variable named isAbsent
A string variable named studentName and a numeric variable named numAbsences
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
10
20
30
40
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The value of first is true, and the value of second is true.
The value of first is true, and the value of second is false.
The value of first is false, and the value of second is true.
The value of first is false, and the value of second is false.
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
x only
y only
x and z only
x, y, and z
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?