
Booleans
Quiz
•
Social Studies, Computers
•
11th Grade
•
Practice Problem
•
Hard
Ms Seccafico
Used 172+ times
FREE Resource
Enhance your content in a minute
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.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
World Trade Organization
Quiz
•
9th Grade - Professio...
10 questions
CURRENCY
Quiz
•
1st Grade - University
12 questions
Media influences on Aggression
Quiz
•
10th - 12th Grade
12 questions
Black History Month
Quiz
•
9th - 12th Grade
11 questions
2/1 Thurs Diversity and Globalization Quiz
Quiz
•
9th - 12th Grade
10 questions
Good vs Bad Parenting Skills
Quiz
•
9th - 12th Grade
10 questions
𝐆𝐫𝐚𝐝𝐞 𝟏𝟏 - 𝐪𝐮𝐢𝐳 𝟏𝟐 (𝐓𝐮𝐥𝐢𝐩 𝐓𝐢𝐦𝐞)
Quiz
•
11th Grade
10 questions
AP Gov 1.5 Ratification MCQ Test
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Social Studies
23 questions
Civil Rights Legislation and Amendments Quiz
Quiz
•
11th Grade
6 questions
Unit 8 DEUA Review
Lesson
•
11th Grade
40 questions
U.S Hist Interim Study Guide
Quiz
•
11th Grade
18 questions
Early civil rights and African Americans
Quiz
•
9th - 12th Grade
22 questions
Benchmark 1 Review
Quiz
•
11th Grade
20 questions
Unit 7.1 The Industrial Revolution
Quiz
•
9th - 12th Grade
13 questions
USHC 3 to North and South Advantages
Quiz
•
11th - 12th Grade
52 questions
Unit 2 Economics (Micro and Market Structures)
Quiz
•
11th - 12th Grade
