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?

unit4practicetest

Quiz
•
Life Project
•
Professional Development
•
Hard
Michael McKinley
Used 6+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
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.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The cost of a customer’s electricity bill is based on the number of units of electricity the customer uses.
For the first 25 units of electricity, the cost is $5 per unit.
For units of electricity after the first 25, the cost is $7 per unit.
Which of the following code segments correctly sets the value of the variable cost to the cost, in dollars, of using numUnits units of electricity?
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following Boolean expressions are equivalent to the expression num ≥ 15? Select two
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If the variables onTime and absent both have the value false, what is displayed as a result of running the code segment?
Is anyone there?
Better late than never.
Hello. Is anyone there?
Hello. Better late than never.
5.
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)
6.
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)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the program, the initial value of x is 5 and the initial value of y is 10. What is displayed as a result of running the program?
Foxtrot
Hotel
November
Yankee
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
sales team-2

Quiz
•
Professional Development
11 questions
Autocredit101

Quiz
•
Professional Development
10 questions
Bendy Quiz

Quiz
•
Professional Development
15 questions
Who knows me best?

Quiz
•
Professional Development
10 questions
KandyQuiz

Quiz
•
Professional Development
11 questions
Adam & Helen

Quiz
•
Professional Development
12 questions
ServiceNow HRSD Module Quiz

Quiz
•
Professional Development
12 questions
NSW HWS

Quiz
•
Professional Development
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade