unit4practicetest

unit4practicetest

Professional Development

14 Qs

quiz-placeholder

Similar activities

Getting to know Shourya

Getting to know Shourya

Professional Development

10 Qs

Halloweeni hommikusöök

Halloweeni hommikusöök

Professional Development

14 Qs

How much do you know me?

How much do you know me?

Professional Development

13 Qs

Baby Shower

Baby Shower

Professional Development

9 Qs

Quiz on Belief in Messengers and Islamic Teachings

Quiz on Belief in Messengers and Islamic Teachings

Professional Development

10 Qs

Financial Habits Quiz

Financial Habits Quiz

Professional Development

16 Qs

unit4practicetest

unit4practicetest

Assessment

Quiz

Life Project

Professional Development

Practice Problem

Hard

Created by

Michael McKinley

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 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.

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?

Media Image
Media Image
Media Image
Media Image

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following Boolean expressions are equivalent to the expression num ≥ 15? Select two

Media Image
Media Image
Media Image
Media Image

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

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

Media Image

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?