Unit 4 #3
Quiz
•
Chemistry
•
12th Grade
•
Easy
Clifford Buckles
Used 9+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student has a data file containing 10,000 numerical values. The student is writing a program to compute the average of the numbers contained in the file. Which of the following procedures is most likely to be useful in the student’s program?
A procedure that returns the quotient when dividing one value by another
A procedure that returns the sum when adding one value to another
A procedure that returns the sum of the values in the file
A procedure that returns true if the file contains any duplicate values and returns false otherwise
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following procedures would be most useful as part of a program to determine whether a word appears in two different text files?
A procedure getWords, which takes a positive integer n and a text file as input and returns the first n words in the text file.
A procedure isFound, which takes a word and a text file as input and returns true if the word appears in the text file
A procedure textMatch, which takes two text files as input and returns true if the two text files are identical.
A procedure sameSize, which takes two text files as input and returns true if the two text files contain the same number of words.
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
A school library allows students to borrow laptops. A computer program is used to count the number of times a particular laptop has been borrowed from the library and the number of times the same laptop has been returned to the library . Which of the following indicate that a particular laptop is not currently borrowed?
Select two answers.
The difference between borrows and
returns is zero.
The product of borrows and returns is a positive even number.
The quotient when borrows is divided by returns is greater than 1.
The sum of borrows and returns is a positive even number.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An application program interface (API) provides a procedure Max, which returns the greater of its two integer arguments.
A programmer would like to find the greatest of three integer values , , and . Which of the following expressions will produce the desired result in every case?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programmer notices the following two procedures in a library. The procedures do similar, but not identical, things.
Procedure Square (n) returns the value n^2.
Procedure Cube (n) returns the value n^3.
Which of the following procedures is a generalization of the procedures described above?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following procedure is intended to return true if the list of numbers myList contains only positive numbers and is intended to return false otherwise. The procedure does not work as intended.
PROCEDURE allPositive(myList)
{
index ← 1
len ← LENGTH(myList)
REPEAT len TIMES
{
IF(myList[index] > 0)
{
RETURN(true)
}
index ← index + 1
}
RETURN(false)
}
For which of the following contents of myList does the procedure NOT return the intended result?
[-3, -2, -1]
[-2, -1, 0]
[-1, 0, 1]
[1, 2, 3]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programmer notices the following two procedures in a library. The procedures do similar, but not identical, things.
Procedure MaxTwo (x, y) returns the greater of its two integer parameters.
Procedure MaxThree (x, y, z) returns the greatest of its three integer parameters.
Which of the following procedures is a generalization of the MaxTwo and MaxThree procedures?
Procedure Min (x, y), which returns the lesser of its two integer parameters
Procedure Max (numList), which returns the maximum value in the list of integers numList
Procedure MaxFour (w, x, y, z), which returns the greatest of its four integer parameters
Procedure OverMax (numList, max), which returns the number of integers in numList that exceed the integer value max
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Chemical Analysis
Quiz
•
12th Grade
8 questions
Electrons and Light
Quiz
•
10th - 12th Grade
8 questions
Light and Electrons Review
Quiz
•
10th - 12th Grade
15 questions
AP Chem
Quiz
•
11th - 12th Grade
6 questions
3.1.9.1 Rate equations (A-level only)
Quiz
•
9th - 12th Grade
10 questions
CFA #2 Chemical and Physical Changes (Term 1)
Quiz
•
10th - 12th Grade
15 questions
Electrons and Light
Quiz
•
10th - 12th Grade
9 questions
Experimental Design
Quiz
•
3rd Grade - University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Chemistry
20 questions
Electron Configuration
Quiz
•
10th - 12th Grade
20 questions
Electron Configuration & Orbital Notation
Quiz
•
9th - 12th Grade
18 questions
Energy Levels, Sublevels, and Orbitals
Quiz
•
10th - 12th Grade
20 questions
Electronic Configuration
Quiz
•
12th Grade
59 questions
Unit #5 Periodic Trends Practice Test
Quiz
•
10th - 12th Grade
18 questions
Ions
Quiz
•
9th - 12th Grade
30 questions
ERHS Chem Chapter 2 - The Atom
Quiz
•
9th - 12th Grade
16 questions
Atomic structure and the periodic table
Quiz
•
10th - 12th Grade