Search Header Logo

AP CSP 3.5 Boolean Expressions Pt. 1

Authored by Herman Galioulline

Computers

9th - 12th Grade

Used 33+ times

AP CSP 3.5 Boolean Expressions Pt. 1
AI

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

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

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?