Unit 4 #1
Quiz
•
Chemistry
•
12th Grade
•
Practice Problem
•
Easy
Clifford Buckles
Used 6+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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?
-The procedure should take max as an input parameter.
-The condition in the REPEAT UNTIL block should be changed to count > max.
-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
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
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
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

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
10 questions
Atomic structure
Quiz
•
KG - Professional Dev...
11 questions
Science Day Quiz
Quiz
•
10th - 12th Grade
10 questions
Naming Acids
Quiz
•
9th - 12th Grade
10 questions
S - Block Elements (Alkali Metals)
Quiz
•
11th Grade - Professi...
10 questions
Oxidation numbers
Quiz
•
11th - 12th Grade
15 questions
Pre-Test Physical Science
Quiz
•
11th - 12th Grade
12 questions
Oxidation - Reduction Reaction
Quiz
•
12th Grade
10 questions
Mathematics for Chemistry - II
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Chemistry
20 questions
Types of Chemical Reactions
Quiz
•
9th - 12th Grade
20 questions
electron configurations and orbital notation
Quiz
•
9th - 12th Grade
14 questions
Reaction Types, Balancing, and Predicting Products
Quiz
•
9th - 12th Grade
8 questions
Empirical and Molecular Formulas
Lesson
•
9th - 12th Grade
4 questions
Stoichiometry Lesson
Lesson
•
9th - 12th Grade
