The two variables age and day are initialized with the values shown.
age <-- 16
day <-- "Tuesday"
Choose the compound conditional that evaluates to true.
AP CSP Boolean Logic 3
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Michael Toepper
Used 13+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The two variables age and day are initialized with the values shown.
age <-- 16
day <-- "Tuesday"
Choose the compound conditional that evaluates to true.
( (age = 16) AND (day = "Tuesday") ) AND (day = "Monday")
( (age < 16) AND (day = "Tuesday") ) OR (day = "Monday")
( (age > 10) AND ( (age + 4) > 20 ) )
NOT ( (age = 16) AND ( NOT (day = "Tuesday") ) )
2.
MULTIPLE SELECT QUESTION
1 min • 1 pt
This program uses a conditional to determine if seafood is safe to consume.
In which situations will rating be "safe"?
Note that there may be multiple answers to this question.
Choose all answers that apply:
When seafood is "mollusk" and daysFrozen is 1
When seafood is "mollusk" and daysFrozen is 9
When seafood is "tuna" and daysFrozen is 3
When seafood is "salmon" and daysFrozen is 7
When seafood is "salmon" and daysFrozen is 6
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The following expression is from the data loading logic of a website.
NOT ( state = "loading" OR result = "error" )
Which of these expressions are logically equivalent?
state ≠ "loading" AND result ≠ "error"
state = "loading" AND result = "error"
NOT ( state = "loading" AND result = "error" )
state ≠ "loading" OR result ≠ "error"
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
This program uses a nested conditional to recommend a heat level for cooking eggs.
In which situations will heatLevel be "medium"?
Choose 1 answer.
When inHurry is false and eggDish is "fried"
When inHurry is true and eggDish is "fried"
When inHurry is false and eggDish is "scrambled"
When inHurry is true and eggDish is "scrambled"
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
This circuit takes the output of an AND gate and sends it through a NOT gate. This circuit is logically equivalent to the NAND logic gate, a common gate in computers.
Select the output column that correctly completes out the truth table for the circuit.
1
1
1
0
0
1
1
1
0
1
1
0
1
0
0
1
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the procedure:
What will be displayed after the following statement is executed?
DISPLAY ( adjustCount (9) + adjustCount (17) )
28
32
33
35
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Two grids are shown. Each grid contains a robot represented as a triangle. Both robots are initially facing left. Each robot can move into a white or gray square, but cannot move into a black region.
For each grid, the program below is intended to move the robot to the gray square. The program uses the procedure Goal_Reached ( ), which evaluates to true if the robot is in the gray square and evaluates to false otherwise.
For which of the grids does the program correctly move the robot to the gray square?
Grid I only
Grid II only
Both grid I and grid II
Neither grid I nor grid II
15 questions
Data Base
Quiz
•
11th Grade
10 questions
Bootstrap Grid
Quiz
•
10th Grade
10 questions
Matplotlib Quiz_1
Quiz
•
12th Grade
15 questions
CS1 Unit 9 Review
Quiz
•
9th - 12th Grade
15 questions
AutoCad
Quiz
•
9th - 10th Grade
15 questions
Image Representation
Quiz
•
7th - 10th Grade
10 questions
Graphics
Quiz
•
9th Grade
10 questions
AP CSP Boolean Logic 2
Quiz
•
9th - 12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University