AP CS A Unit 3 Review
Quiz
•
Computers
•
11th - 12th Grade
•
Practice Problem
•
Hard
Sammi McConnell
Used 121+ times
FREE Resource
About this resource
This quiz focuses on boolean logic, conditional statements, and control structures in Java programming, specifically covering AP Computer Science A Unit 3 concepts at the 11th-12th grade level. Students need a solid understanding of boolean expressions, logical operators (&&, ||, !), relational operators, De Morgan's laws, and short-circuit evaluation to successfully complete these problems. The questions assess critical reasoning skills including analyzing complex conditional statements, predicting code output, understanding truth tables, working with compound boolean expressions, and recognizing equivalent logical constructs. Students must also demonstrate proficiency with Java-specific concepts such as the Math.random() method, string comparison using both == and .equals(), and object reference equality versus value equality. Created by Sammi McConnell, a Computers teacher in US who teaches grade 11-12. This comprehensive review quiz serves as an excellent formative assessment tool for students preparing for the AP Computer Science A exam, particularly for reinforcing Unit 3 concepts before moving to more advanced programming topics. Teachers can effectively use this quiz as a warm-up activity to activate prior knowledge, as targeted practice for students struggling with boolean logic concepts, or as homework to reinforce classroom instruction. The quiz works exceptionally well for review sessions before unit tests or as a diagnostic tool to identify specific areas where students need additional support. The content aligns with College Board AP Computer Science A standards, specifically addressing Essential Knowledge points related to conditional statements, boolean expressions, and logical reasoning that form the foundation of algorithmic thinking and program control flow.
See more
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following code, assuming grade is an int:
Which of the following will always produce the same result as the code above, regardless of the value of grade? (multiple correct answers)
Answer explanation
This code will replace the original and always work the same. If the grade is less
than or equal to 75, Eh is printed. If grade is greater than or equal to 100, Great is
printed and then the rest in between will receive Good.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the following code?
11
15
31
error
Answer explanation
The x * 3 is equal to 30 so the first if runs and increments x (which is 10) by one. Then
since 11 is smaller than 31, it will not run the second if, thus printing 11
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Consider the following incomplete code segment.
Consider the following potential replacements for /* missing code */ . Which of these replacements will cause
the code segment to always print false ? Assume that Math is imported correctly into our program.
(int)(Math.random() * 10) + 20
(int)(Math.random() * 10) + 25
(int)(Math.random() * 10) + 30
(int)(Math.random() + 30)
Answer explanation
Math.random() returns a random value between 0 (inclusive)
and 1 (exclusive). So Math.random()*10 + 20 can give values
between 20.0 and 29.9999... By typecasting the value to an int,
the decimal values are truncated, which gives a range from 20 to
29 inclusive, meaning it never returns 30, and false is always
printed as a result
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the variables, which boolean condition is true?
a < b && a == b
a > b || a != b
a < b && a != b
b >= a && a >= b
Answer explanation
This is equivalent to a == b, which is true
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The following if statement tests the snowfall in Alaska during the months of December, January and February.
Assume low represents a threshold determined to be the least amount of snow required to be normal and high
represents a threshold determined to be the most amount of snow required to be normal and snow represents the
amount of snow in inches for that month. All variables are doubles. It could be replaced with:
Answer explanation
This solution properly splits up the compound boolean expression and created two
nested if/else statements
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following truth table matches which boolean condition?
A && ( A || B )
A && ( A && B )
!A && ( A || !B )
A || ( A || B )
Answer explanation
This is equivalent to A || B which the truth table reflects
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
A weather app records the current temperature to the nearest degree Fahrenheit using an int variable temp.
The app also uses a String variable tempAdj to store an adjective based on the value of temp which will be used
in a short written summary of the current weather. The values of tempAdj are determined as follows:
Which of the following code segments will correctly set the value of tempAdj for any given value of temp? (Multiple correct answers)
Answer explanation
Both code segments will work as they should. Both start with the hottest condition and
then test using an else if statement until the first condition is met and the tempAdj values
is properly assigned
Create a free account and access millions of resources
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
15 questions
Quiz 1
Quiz
•
1st - 12th Grade
20 questions
Introducción a las bases de datos
Quiz
•
12th Grade
16 questions
J808 LO6.2 Tools to present information
Quiz
•
10th - 11th Grade
15 questions
Review for Midterm Test ICT 3
Quiz
•
1st - 11th Grade
15 questions
BTEC Unit 1: HTTPS, SSL and TLS Quiz
Quiz
•
12th Grade
21 questions
Google : ¡A trabajar!
Quiz
•
10th - 11th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
20 questions
Network topologies
Quiz
•
8th Grade - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
