Comp Sci Unit 2 #8

Quiz
•
Computers
•
11th Grade
•
Easy
Nick Nessralla
Used 26+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 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
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 NAND gate is a type of logic gate that produces an output of false only when both of its two inputs are true. Otherwise, the gate produces an output of true . Which of the following Boolean expressions correctly models a NAND gate with inputs P and Q ?
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The figure below shows a circuit composed of two logic gates. The output of the circuit is true.
Which of the following is a true statement about input A?
Input A must be true.
Input A must be false.
Input A can be either true or false.
There is no possible value of input A that will cause the circuit to have the output true.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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))
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A large spreadsheet contains the following information about local restaurants. A sample portion of the spreadsheet is shown below.
In column B, the price range represents the typical cost of a meal, where "lo" indicates under $10, "med" indicates $11 to $30, and "hi" indicates over $30.
In column D, the average customer rating is set to -1.0 for restaurants that have no customer ratings.
A student wants to count the number of restaurants in the spreadsheet whose price range is $30 or less and whose average customer rating is at least 4.0. For a given row in the spreadsheet, suppose prcRange contains the price range as a string and avgRating contains the average customer rating as a decimal number.
Which of the following expressions will evaluate to true if the restaurant should be counted and evaluates to false otherwise?
(avgRating ≥ 4.0) AND ((prcRange = "lo") AND (prcRange = "med"))
(avgRating ≥ 4.0) AND ((prcRange = "lo") OR (prcRange = "med"))
(avgRating ≥ 4.0) OR ((prcRange = "lo") AND (prcRange = "med"))
(avgRating ≥ 4.0) OR ((prcRange = "lo") OR (prcRange = "med"))
6.
MULTIPLE CHOICE QUESTION
30 sec • 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)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a certain country, a person must be at least 16 years old to drive a car and must be at least 18 years old to vote. The variable age represents the age of a person as an integer.
Which of the following expressions evaluates to true if the person is old enough to drive but not old enough to vote, and evaluates to false otherwise?
(age ≥ 16) AND (age ≤ 18)
(age ≥ 16) AND (NOT(age ≥ 18))
(age < 18) AND (NOT(age < 16))
II only
I and II only
I and III only
II and III only
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Programming - Test Data

Quiz
•
3rd - 11th Grade
10 questions
AUDIENCE

Quiz
•
9th - 11th Grade
10 questions
AP CSP Boolean Logic 2

Quiz
•
9th - 12th Grade
15 questions
Hangman Game - Programming Questions

Quiz
•
7th - 11th Grade
11 questions
Expressions coding and or not coding

Quiz
•
9th - 12th Grade
10 questions
AP CSP Boolean Logic 3

Quiz
•
9th - 12th Grade
14 questions
AP CSP Review

Quiz
•
9th Grade - University
11 questions
Password Safety & Security

Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
7 questions
EAHS PBIS Lesson- Bathroom

Lesson
•
9th - 12th Grade
57 questions
How well do YOU know Neuwirth?

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
6 questions
Secondary Safety Quiz

Lesson
•
9th - 12th Grade
4 questions
Study Skills

Lesson
•
5th - 12th Grade
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
20 questions
Points, Lines & Planes

Quiz
•
9th - 11th Grade