Unit 4 #1

Unit 4 #1

12th Grade

10 Qs

quiz-placeholder

Similar activities

Chemistry Regent - Aug 2015 Q41-50

Chemistry Regent - Aug 2015 Q41-50

9th - 12th Grade

10 Qs

Ech Line Graphs: Collision Theory, Catalysts, and Inhibitors

Ech Line Graphs: Collision Theory, Catalysts, and Inhibitors

10th - 12th Grade

10 Qs

Atomic Emission Spectra Learning Check

Atomic Emission Spectra Learning Check

10th - 12th Grade

10 Qs

Lab Safety Quiz

Lab Safety Quiz

9th - 12th Grade

10 Qs

Questão de aula formativa AL 0

Questão de aula formativa AL 0

10th Grade - University

10 Qs

Electrons, Wavelength, Frequency, Light

Electrons, Wavelength, Frequency, Light

10th - 12th Grade

8 Qs

Unit 4 #3

Unit 4 #3

12th Grade

10 Qs

Unit 4 #2

Unit 4 #2

12th Grade

10 Qs

Unit 4 #1

Unit 4 #1

Assessment

Quiz

Chemistry

12th Grade

Easy

Created by

Clifford Buckles

Used 6+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?