Booleans

Booleans

11th Grade

8 Qs

quiz-placeholder

Similar activities

A3 IIB - Estructuras Condicionales I

A3 IIB - Estructuras Condicionales I

10th Grade - University

10 Qs

Logic Gates

Logic Gates

8th - 12th Grade

12 Qs

AP CSP Conditionals

AP CSP Conditionals

9th - 12th Grade

7 Qs

OCR J277 2.4 Boolean Logic MCQ (Quiz 1)

OCR J277 2.4 Boolean Logic MCQ (Quiz 1)

10th - 11th Grade

12 Qs

COMP SCI Unit 2 #7

COMP SCI Unit 2 #7

11th Grade

10 Qs

Logic Circuits

Logic Circuits

10th - 12th Grade

10 Qs

Resume Knowledge Quiz

Resume Knowledge Quiz

9th - 12th Grade

10 Qs

Question Type: Pseudocode

Question Type: Pseudocode

10th - 12th Grade

8 Qs

Booleans

Booleans

Assessment

Quiz

Social Studies, Computers

11th Grade

Hard

Created by

Ms Seccafico

Used 172+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 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

2.

MULTIPLE CHOICE QUESTION

1 min • 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)

3.

MULTIPLE CHOICE QUESTION

1 min • 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

1 min • 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)

5.

MULTIPLE CHOICE QUESTION

45 sec • 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

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

A certain game keeps track of the maximum and minimum scores obtained so far. If num represents the most recent score obtained, which of the following algorithms correctly updates the values of the maximum and the minimum?

If num is greater than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.

If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.

If num is less than the minimum, set the minimum equal to num. Otherwise, if num is less than the maximum, set the maximum equal to num.

If num is greater than the minimum, set the minimum equal to num. Otherwise, if num is less than the maximum, set the maximum equal to num.

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

A programmer is creating an algorithm that will be used to turn on the motor to open the gate in a parking garage. The specifications for the algorithm are as follows.


The gate should not open when the time is outside of business hours.

The motor should not turn on unless the gate sensor is activated.

The motor should not turn on if the gate is already open.

Which of the following algorithms can be used to open the gate under the appropriate conditions?

Check if the time is outside of business hours. If it is, check if the gate sensor is activated. If it is, check if the gate is closed. If it is, turn on the motor.

Check if the time is during business hours. If it is, check if the gate sensor is activated. If it is, check if the gate is open. If it is, turn on the motor.

Check if the time is during business hours. If it is, check if the gate sensor is activated. If it is not, check if the gate is open. If it is not, turn on the motor.

Check if the time is during business hours. If it is, check if the gate sensor is activated. If it is, check if the gate is open. If it is not, turn on the motor.

8.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

If the value of x is 3 and the value of y is 5, what is displayed as a result of executing the code segment?

-2

2

9

Nothing will be displayed.