
APCSP Unit 1 Variables, Random, Math Practice Questions
Authored by Victoria Berkowitz
Computers
11th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A developer is creating a program that will store a user's email address and whether the user has verified their account. Which of the following variables are most appropriate for the program?
A string variable named e and a Boolean variable named v
A string variable named emailAddress and a Boolean variable named isVerified
A string variable named email and a numeric variable named verificationStatus
A string variable named userEmail and a numeric variable named verified
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment, which uses the variables x, y, and z.
x ← 4
y ← 5
z ← 6
x ← z
y ← x
DISPLAY (x)
DISPLAY (y)
What is displayed as a result of running the code segment?
4 5
5 6
6 6
6 5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The variable amountBooks is to be used to represent the amount of books on a shelf. Which of the following is the most appropriate data type for numBooks?
Boolean
String
Number
Array
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
a ← 15
b ← a MOD c
Which of the following initial values of the variable c would result in the variable b being set to 3 after the code segment is executed?
2
3
4
5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A die has 6 faces numbered 1 to 6. Which of the following code segments can be used to simulate rolling the die four times and assigns the sum of the values obtained by the four different rolls to the variable total?
total ← RANDOM(1, 6) + RANDOM(1, 6) + RANDOM(1, 6) + RANDOM(1, 6)
total ← RANDOM(1, 24)
total ← 4 * RANDOM(1, 6)
total ← 6 * RANDOM(1, 4)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of executing the code segment with variables a, b, c, and d initialized as shown?
11 30 40 55
12 35 35 50
17 45 35 60
10 25 35 50
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which code segment correctly simulates two spins of a spinner with 8 equal regions?
sum ← RANDOM(1, 8) + RANDOM(1, 8)
sum ← RANDOM(1, 16)
sum ← 2 * RANDOM(1, 8)
sum ← 8 * RANDOM(1, 2)
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?
Similar Resources on Wayground
18 questions
School Mangement System ICT 0417 IGCSE
Quiz
•
10th - 12th Grade
20 questions
Latihan Soal Administrasi Infrastruktur Jaringan XII TKJ
Quiz
•
10th - 12th Grade
10 questions
CHƯƠNG TRÌNH CON BT1
Quiz
•
10th - 12th Grade
20 questions
Pemrograman Dasar 3
Quiz
•
9th - 12th Grade
10 questions
R082 Book Cover Assets planning
Quiz
•
7th - 12th Grade
10 questions
DTJSQuiz
Quiz
•
11th Grade
20 questions
TEST1.PY
Quiz
•
10th Grade - University
20 questions
EMPOWERMENT ONLINE QUIZ BEE 2
Quiz
•
11th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade
10 questions
Evaluating Piecewise Functions Practice
Quiz
•
11th Grade
18 questions
Success Strategies
Quiz
•
9th - 12th Grade