COMP SCI Unit 2 #7

Quiz
•
Computers
•
11th Grade
•
Easy
Nick Nessralla
Used 20+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An office building has two floors. A computer program is used to control an elevator that travels between the two floors. Physical sensors are used to set the following Boolean variables.
The elevator moves when the door is closed and the elevator is called to the floor that it is not currently on. Which of the following Boolean expressions can be used in a selection statement to cause the elevator to move?
(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)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case.
A flowchart is a way to visually represent an algorithm. The flowchart below is used by an apartment rental Web site to set the variable to for apartments that meet certain criteria.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The diagram below shows a circuit composed of two logic gates labeled OR and AND. Each gate takes two inputs and produces a single output.
If the inputs A and C are both true, which of the following best describes the output of the AND gate?
The output will be true no matter what the value of input B is.
The output will be false no matter what the value of input B is.
The output will be true if input B is true; otherwise it will be false.
The output will be false if input B is true; otherwise it will be true.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
Which of the following initial values of the variable y would result in the variable z being set to 2 after the code segment is executed?
1
2
3
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Three words are stored in the variables word1, word2, and word3. The values of the variables are to be updated as shown in the following table.
Which of the following code segments can be used to update the values of the variables as shown in the table?
temp ← word1
word3 ← word1
word1 ← temp
temp ← word1
word1 ← word3
word3 ← temp
temp ← word1
word1 ← word2
word2 ← word3
word3 ← temp
temp ← word3
word3 ← word2
word2 ← word1
word1 ← temp
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
The following table shows the value of expression based on the values of input1 and input2.
Which of the following expressions are equivalent to the value of expression as shown in the table?
Select two answers.
(NOT input1) OR (NOT input2)
(NOT input1) AND (NOT input2)
NOT (input1 OR input2)
NOT (input1 AND input2)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programmer wants to determine whether a score is within 10 points of a given target. For example, if the target is 50, then the scores 40, 44, 50, 58, and 60 are all within 10 points of the target, while 38 and 61 are not.
Which of the following Boolean expressions will evaluate to true if and only if score is within 10 points of target ?
(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)
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Conditionals

Quiz
•
1st - 12th Grade
15 questions
01 Searching Algorithms

Quiz
•
9th - 12th Grade
7 questions
Design Process

Quiz
•
10th - 12th Grade
6 questions
Understanding Lighting Types

Quiz
•
9th - 12th Grade
15 questions
Creative iMedia Revision

Quiz
•
10th - 11th Grade
15 questions
Test Sumatif Pengetahuan Mapel Konsentrasi Keahlian (27022024)

Quiz
•
11th Grade
10 questions
Applied Networking

Quiz
•
11th - 12th Grade
12 questions
R084 Comic Target Audiences

Quiz
•
9th - 11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade