AP CSP 3.5 Boolean Expressions Pt. 1

AP CSP 3.5 Boolean Expressions Pt. 1

9th - 12th Grade

6 Qs

quiz-placeholder

Similar activities

CP Pseudocode Review #3

CP Pseudocode Review #3

11th Grade

10 Qs

Pseudocode CSP

Pseudocode CSP

10th - 12th Grade

8 Qs

AP CSP Pseudo Code

AP CSP Pseudo Code

10th - 12th Grade

8 Qs

APCSP Pseudocode

APCSP Pseudocode

10th - 12th Grade

8 Qs

AP Pseudocode

AP Pseudocode

10th - 12th Grade

8 Qs

AP CSP Review

AP CSP Review

9th - 12th Grade

10 Qs

Comp Sci Unit 2 #8

Comp Sci Unit 2 #8

11th Grade

10 Qs

AP CSP-Review Session 1 MCQ Quiz

AP CSP-Review Session 1 MCQ Quiz

10th Grade

10 Qs

AP CSP 3.5 Boolean Expressions Pt. 1

AP CSP 3.5 Boolean Expressions Pt. 1

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Herman Galioulline

Used 27+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

In the following expression, the variable truckWeight has the value 70000 and the variable weightLimit has the value 80000.


truckWeight < weightLimit


What value does the expression evaluate to?

70000

80000

true

false

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

To qualify for a particular scholarship, a student must have an overall grade point average of 3.0 or above and must have a science grade point average of over 3.2. Let overallGPA represent a student’s overall grade point average and let scienceGPA represent the student’s science grade point average. Which of the following expressions evaluates to true if the student is eligible for the scholarship and evaluates to false otherwise?

(overallGPA > 3.0) AND (scienceGPA > 3.2)

(overallGPA > 3.0) AND (scienceGPA ≥ 3.2)

(overallGPA ≥ 3.0) AND (scienceGPA > 3.2)

(overallGPA ≥ 3.0) AND (scienceGPA ≥ 3.2)

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Let n be an integer value. Which of the following expressions evaluates to true if and only if n is a two-digit integer (i.e., in the range from 10 to 99, inclusive)?

n = (n MOD 100)

(n ≥ 10) AND (n < 100)

(n < 10) AND (n ≥ 100)

(n > 10) AND (n < 99)

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

To attend a particular camp, a student must be either at least 13 years old or in grade 9 or higher, but must not yet be 18 years old. Let age represent a student’s age and let grade represent the student’s grade level. Which of the following expressions evaluates to true if the student is eligible to attend the camp and evaluates to false otherwise?

((age ≥ 13) OR (grade ≥ 9)) AND (age ≤ 18)

((age ≥ 13) OR (grade ≥ 9)) AND (age < 18)

((age ≥ 13) OR (grade ≥ 9)) OR (age ≤ 18)

((age ≥ 13) OR (grade ≥ 9)) OR (age < 18)

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

The following code segment is used to determine whether a customer is eligible for a discount on a movie ticket.


val1 ← (NOT (category = "new")) OR (age ≥ 65)

val2 ← (category = "new") AND (age < 12)


If category is "new" and age is 20, what are the values of val1 and val2 as a result of executing the code segment?

val1 = true, val2 = true

val1 = true, val2 = false

val1 = false, val2 = true

val1 = false, val2 = false

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

true true true

false false false

true false true

false false true