Unit 4 #1

Unit 4 #1

12th Grade

10 Qs

quiz-placeholder

Similar activities

Regent Review 2c

Regent Review 2c

9th - 12th Grade

10 Qs

Group 6 - pH test - Period 2

Group 6 - pH test - Period 2

9th - 12th Grade

11 Qs

Training for Quizizz

Training for Quizizz

9th - 12th Grade

10 Qs

Temperature & Solids Liquids and Gasses

Temperature & Solids Liquids and Gasses

11th - 12th Grade

15 Qs

Where do elements come from?

Where do elements come from?

9th - 12th Grade

10 Qs

2018-19 Course Criteria

2018-19 Course Criteria

9th - 12th Grade

15 Qs

Types of Batteries & Voltaic Cells

Types of Batteries & Voltaic Cells

9th - 12th Grade

14 Qs

Acid Base Volumetric analysis L.C

Acid Base Volumetric analysis L.C

10th - 12th Grade

14 Qs

Unit 4 #1

Unit 4 #1

Assessment

Quiz

Chemistry

12th Grade

Practice Problem

Easy

Created by

Clifford Buckles

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...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

A student wrote the following procedure to calculate the sum of the integers from 1 to 5.


The student later decides to modify the procedure to calculate the sum of the integers from 1 to max, which represents any positive integer greater than 1.

Which of the following changes should be made to the procedure to meet the student’s goal?

  1. -The procedure should take max as an input parameter.

  2. -The condition in the REPEAT UNTIL block should be changed to count > max.

  3. -The condition in the REPEAT UNTIL block should be changed to max < 5.

Responses


I only


II only


I and II


I and III

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In the following procedure, assume that the parameter x is an integer.


Which of the following best describes the behavior of the procedure?

It displays nothing if x is negative and displays true otherwise.


It displays nothing if x is negative and displays false otherwise.

It displays true if x is negative and displays nothing otherwise.

It displays true if x is negative and displays false otherwise.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In the procedure Mystery below, the parameter number is a positive integer.


Which of the following best describes the result of running the procedure Mystery?

The procedure returns true when the initial value of number is 2, and it otherwise returns false.

The procedure returns true when the initial value of number is greater than 2, and it otherwise returns false.


The procedure returns true when the initial value of number is even, and it otherwise returns false.

The procedure returns true when the initial value of number is odd, and it otherwise returns false.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In the following procedure, the parameters x and y are integers.

Which of the following is the most appropriate documentation to appear with the calculate procedure?

Displays the value of x + (y / x).The value of the parameter x must not be 0.

Displays the value of x + (y / x).The value of the parameter y must not be 0.

Displays the value of (x + y) / x.The value of the parameter x must not be 0.

Displays the value of (x + y) / x.The sum of the parameters x and y must not be 0.

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

In the following procedure, the parameter age represents a person’s age. The procedure is intended to return the name of the age group associated with age. People who are under 18 are considered minors, people who are 65 and older are considered senior citizens, and all other people are considered adults. The procedure does not work as intended.

Line 1:  PROCEDURE ageGroup(age)

Line 2:  {

Line 3:     result ← "adult"

Line 4:     IF(age ≥ 65)

Line 5:     {

Line 6:        result ← "senior citizen"

Line 7:     }

Line 8:     RETURN(result)

Line 9:

Line 10:    result ← "adult"

Line 11:    IF(age < 18)

Line 12:    {

Line 13:       result ← "minor"

Line 14:    }

Line 15:    RETURN(result)

Line 16: }

Removing which two lines of code will cause the procedure to work as intended?

Select two answers.

Line 3


Line 8

Line 10


Line 15

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the following procedure, the parameter numList is a list of numbers and the parameters j and k are integers.

PROCEDURE swapListElements(numList, j, k)

{

newList ← numList

newList[j] ← numList[k]

newList[k] ← numList[j]

RETURN(newList)

}

Which of the following is the most appropriate documentation to appear with the swapListElements procedure?

Returns a copy of numList with the elements at indices j and k interchanged.The value of j must be between 0 and the value of k, inclusive.

Returns a copy of numList with the elements at indices j and k interchanged.The values of j and k must both be between 1 and LENGTH(numList), inclusive.


Interchanges the values of the parameters j and k.The value of j must be between 0 and the value of k, inclusive.


Interchanges the values of the parameters j and k.The values of j and k must both be between 1 and LENGTH(numList), inclusive.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the following procedure, the parameter max is a positive integer.

PROCEDURE printNums(max)

{

count ← 1

REPEAT UNTIL(count > max)

{

DISPLAY(count)

count ← count + 2

}

}

Which of the following is the most appropriate documentation to appear with the printNums procedure?

Prints all positive even integers that are less than or equal to max.

Prints all positive odd integers that are less than or equal to max.

Prints all positive even integers that are greater than max.

Prints all positive odd integers that are greater than max.

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?