
Comp Sci Unit 2 #8
Authored by Nick Nessralla
Computers
11th Grade
Used 26+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
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
14 questions
LA5.C5: Branching and Subroutines
Quiz
•
9th Grade - University
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 12th Grade
10 questions
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
13 questions
Guess the Retro Computer 1
Quiz
•
KG - Professional Dev...
10 questions
Programming Constructs
Quiz
•
5th - 11th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
15 questions
Quiz 1
Quiz
•
1st - 12th Grade
15 questions
Data Security Worksheet
Quiz
•
10th Grade - University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
10 questions
Martin Luther King, Jr. For Kids
Interactive video
•
1st - 12th Grade
10 questions
Dr. King's Speech and Its Impact
Interactive video
•
7th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Los mandatos y las recetas
Lesson
•
11th Grade
7 questions
Anti-Bullying ARS 15-341
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
15 questions
TSI Math Practice Questions
Quiz
•
8th - 12th Grade