[8c] Boolean Expressions Review 1(xp)

[8c] Boolean Expressions Review 1(xp)

Assessment

Flashcard

Computers

10th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

8 questions

Show all answers

1.

FLASHCARD QUESTION

Front

If the inputs A and C are both true, which of the following best describes the output of the AND gate?

Back

The output will be true no matter what the value of input B is.

Answer explanation

Because the value of input A is true, the resulting value coming out of the OR gate must be true. Because the value of input C is true, the resulting value coming out of the AND gate is true. The value of input B did not affect this result.

2.

FLASHCARD QUESTION

Front

The elevator moves when the door is closed and the elevator is called to the floor that it is not currently on. Which Boolean expression can be used to cause the elevator to move? Options: (onFloor1 AND callTo2) AND (onFloor2 AND callTo1), (onFloor1 AND callTo2) OR (onFloor2 AND callTo1), (onFloor1 OR callTo2) AND (onFloor2 OR callTo1), (onFloor1 OR callTo2) OR (onFloor2 OR callTo1)

Back

(onFloor1 AND callTo2) OR (onFloor2 AND callTo1)

3.

FLASHCARD QUESTION

Front

Which Boolean expression evaluates to true if and only if score is within 10 points of target? Options: (score ≤ target + 10) AND (target + 10 ≤ score), (target + 10 ≤ score) AND (score ≤ target - 10), (score ≤ target - 10) AND (score ≤ target + 10), (target - 10 ≤ score) AND (score ≤ target + 10)

Back

(target - 10 ≤ score) AND (score ≤ target + 10)

Answer explanation

This Boolean expression is true if and only if score is between target - 10 and target + 10, inclusive. Therefore, it evaluates to true if and only if score is in the desired range.

4.

FLASHCARD QUESTION

Front

The diagram below shows a circuit composed of three logic gates. Each gate takes two inputs and produces a single output. For which of the following input values will the circuit have an output of false?

Back

Media Image

Answer explanation

With these inputs, the  AND gate will produce an output of false and the first  OR gate will produce an output of false. Since both inputs to the second OR gate will be false, the circuit will have an output of false.

5.

FLASHCARD QUESTION

Front

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

Back

val1 = false, val2 = false

Answer explanation

The variable val1 is assigned false because NOT (category = "new") is false and age ≥ 65 is false. The variable val2 is assigned false because age < 12 is false.

6.

FLASHCARD QUESTION

Front

To be eligible for a particular ride at an amusement park, a person must be at least 12 years old and must be between 50 and 80 inches tall, inclusive. Let age represent a person’s age, in years, and let height represent the person’s height, in inches. Which of the following expressions evaluates to true if and only if the person is eligible for the ride? (age ≥ 12) AND ((height ≥ 50) AND (height ≤ 80)), (age ≥ 12) AND ((height ≤ 50) AND (height ≥ 80)), (age ≥ 12) AND ((height ≤ 50) OR (height ≥ 80)), (age ≥ 12) OR ((height ≥ 50) AND (height ≤ 80))

Back

(age ≥ 12) AND ((height ≥ 50) AND (height ≤ 80))

Answer explanation

For a person to be eligible for the ride, age must be greater than or equal to 12 and height must be greater than or equal to 50 and less than or equal to 80. Therefore, all three of the conditions (age ≥ 12), (height ≥ 50), and (height ≤ 80) must be true for a person to be eligible for the ride.

7.

FLASHCARD QUESTION

Front

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. Which of the following expressions evaluates to true if the student is eligible to attend the camp and evaluates to false otherwise? Options: ((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)

Back

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

Answer explanation

This expression evaluates to true for students whose age is at least 13 or whose grade is at least 9, and whose age is strictly less than 18.

8.

FLASHCARD QUESTION

Front

Back

Answer explanation

This option is correct. The flowchart sets include to true whenever floor is greater than 10 or bedrooms equal 3, and sets include to false otherwise. Therefore, the algorithm is equivalent to include <-- (floor > 10) OR (bedrooms = 3) .