AP CSP Conditionals

AP CSP Conditionals

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Alicia Wade

Used 161+ times

FREE Resource

About this resource

This quiz focuses on boolean logic and conditional statements in computer programming, specifically targeting AP Computer Science Principles concepts at the high school level (grades 9-12). The questions systematically assess students' understanding of logical operators including AND (&&), OR (||), and NOT (!), as well as comparison operators for equality and relational comparisons. Students must demonstrate mastery of operator precedence, the ability to evaluate complex nested boolean expressions, and understanding of how conditional statements control program flow. The core reasoning skills required include logical thinking, step-by-step expression evaluation, and comprehension of how multiple conditions combine to produce true or false outcomes. Students need to understand variable assignment, string and numeric comparisons, and the syntax conventions used in programming languages for conditional constructs. Created by Alicia Wade, a Computer Science teacher in the US who teaches grades 9-12. This quiz serves as an excellent formative assessment tool for reinforcing fundamental programming concepts before students tackle more complex algorithmic thinking challenges. Teachers can deploy this as a warm-up activity to activate prior knowledge, use it for guided practice during direct instruction, or assign it as homework to solidify understanding of boolean operations. The systematic progression from simple comparisons to complex nested expressions makes it ideal for differentiated instruction and helps identify specific areas where students need additional support. This assessment directly supports CSTA K-12 Computer Science Standards, particularly 3A-AP-15 (justifying the selection of specific control structures) and 3A-AP-10 (using variables within a program), while building foundational skills essential for success on the AP Computer Science Principles exam.

See more

Student preview

quiz-placeholder

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that the two variables age and day have been initialized with the values shown.

var age = 16;

var day = "Monday";


Determine if the following statement evaluates to true or false.

(age > 10) && (age < 20)

true

false

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that the two variables age and day have been initialized as shown below.


var age = 16;

var day = "Monday";


Determine if the following statement evaluates to true or false.


!(age > 10)

true

false

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that the two variables age and day have been initialized as shown below.


var age = 16;

var day = "Monday";


Determine if the following statement evaluates to true or false.


(day == "Tuesday") || (age < 12)

true

false

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that the two variables age and day have been initialized as shown below.


var age = 16;

var day = "Monday";


Determine if the following statement evaluates to true or false.


!((age == 16) || (day == "Monday"))

true

false

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that the two variables age and day have been initialized as shown below.


var age = 16;

var day = "Monday";


Determine if the following statement evaluates to true or false.


!((age == 16) && !(day == "Monday"))

true

false

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that the two variables age and day have been initialized as shown below.


var age = 16;

var day = "Monday";


Determine if the following statement evaluates to true or false.


((age == 16) && (day == "Monday")) && (day == "Tuesday")

true

false

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that the two variables age and day have been initialized as shown below.


var age = 16;

var day = "Monday";


Determine if the following statement evaluates to true or false.


((age == 16) && (day == "Monday")) || (day == "Tuesday")

true

false

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?