Review: Mix 7

Review: Mix 7

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Jennie Malonek

Used 4+ times

FREE Resource

Student preview

quiz-placeholder

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

A programmer is developing a word game. The programmer wants to create an algorithm that will take a list of words and return a list containing the first letter of all words that are palindromes (words that read the same backward or forward). The returned list should be in alphabetical order. For example, if the list contains the words ["banana", "kayak", "mom", "apple", "level"], the returned list would contain ["k", "l", "m"] (because "kayak", "level", and "mom" are palindromes). The programmer knows that the following steps are necessary for the algorithm but is not sure in which order they should be executed. Executing which of the following sequences of steps will enable the algorithm to work as intended?

I. First shorten, then keep palindromes, then sort

II. First keep palindromes, then shorten, then sort

III. First sort, then keep palindromes, then shorten

I only

II only

I and III

II and III

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following best describes the purpose of machine learning programs?

To analyze large data sets, recognize patterns, and make predictions based on data

To automatically translate algorithms from natural language to machine language

To determine whether an algorithm can be constructed to answer “yes” or “no” for all possible inputs

To find approximate solutions to problems that would otherwise require an unreasonably long amount of

time to solve

3.

MULTIPLE CHOICE QUESTION

2 mins • 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 n2

Procedure cube (n) returns the value n3

Which of the following procedures is a generalization of the procedures described above?

Procedure Add (n, m), which returns the value n + m

Procedure Fourth (n), which returns the value n4

Procedure Polynomial(n), which returns the value n3 +n2

Procedure Power (n, m), which returns the value nm

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

A student wrote the procedure below, which is intended to ask whether a user wants to keep playing a game.

The procedure does not work as intended.

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

The procedure returns true when the user inputs the value "y" and returns false otherwise.

The procedure returns true when the user inputs the value "n" and returns false otherwise.

The procedure returns true no matter what the input value is.

The procedure returns false no matter what the input value is.

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following describes a benefit of using hexadecimal numbers instead of binary numbers to

represent data?

Hexadecimal can be used to represent fractional values, but binary can only represent integers.

Hexadecimal can be used to represent a wider variety of data types than binary can, including color and

geolocation data.

Hexadecimal is easier for a computer to understand than binary is.

A hexadecimal representation of a value generally requires fewer digits than a binary representation of the

same value.

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?