Introduction to Using Data Sets MCQ Practice

Question 1 of 10

Lampwick Cinema keeps Saturday ticket counts in the table. In this topic, what is that table an example of?

Showtime Tickets sold
2:00 p.m. 18
5:00 p.m. 41
8:00 p.m. 36
  1. A. A random number, because 41 appears once
  2. B. A data set: a collection of pieces of information, here ticket counts by showtime
  3. C. A keyboard, because staff typed the numbers
  4. D. A class constructor, because the table has two columns

Question 2 of 10

A clerk totals Saturday tickets using this written plan.

1. Set total to 0
2. Look at the next tickets-sold value
3. Add that value to total
4. Repeat steps 2-3 until every value has been used
5. Report total

Which statement matches how values in a data set are processed in this topic?

  1. A. Every ticket count must be added at the same instant or the total is illegal.
  2. B. The plan is invalid unless it uses an ArrayList.
  3. C. Only the largest value may be looked at; smaller values are skipped automatically.
  4. D. Each tickets-sold value is accessed one at a time and then combined into a running total.

Question 3 of 10

Using Lampwick's Saturday table (18, then 41, then 36) and the totaling plan that starts at 0 and adds one value at a time, what total is reported?

  1. A. 95
  2. B. 41
  3. C. 18
  4. D. 3

Question 4 of 10

Puddlewatch records afternoon temperatures. A student plans an algorithm with a table before writing any Java.

Day Temp (F)
Mon 71
Tue 68
Wed 74

Why is the table useful for planning the algorithm?

  1. A. Tables replace the need to look at any value.
  2. B. A table can be used only after the program already prints output.
  3. C. The table shows each piece of information in order so the student can plan looking at one reading at a time.
  4. D. Planning tables are allowed only for ticket sales, not weather.

Question 5 of 10

A written algorithm finds the hottest Puddlewatch reading: start with the first temperature, look at each remaining reading one at a time, and replace the stored hottest when a reading is greater. Using 71, then 68, then 74, which value is reported?

  1. A. 68, because it is in the middle of the table
  2. B. 74
  3. C. 71, because the algorithm may look only at the first value
  4. D. 213, the sum of the three readings

Question 6 of 10

Mossbridge Library lists one day's checkouts. A clerk counts how many titles were checked out more than 4 times, looking at one row at a time.

Title Checkouts
River Clock 2
Lantern Map 6
Quiet Harbor 5
Pebble Song 4

What count should the clerk report?

  1. A. 4, the number of titles in the table
  2. B. 17, the sum of all checkouts
  3. C. 6, the largest single checkout number
  4. D. 2, because Lantern Map and Quiet Harbor are the only rows above 4

Question 7 of 10

A student writes this plan for Lampwick ticket totals but leaves out a step.

1. Set total to 0
2. Add the current tickets-sold value to total
3. Report total

Which missing idea would make the plan match processing an entire data set?

  1. A. Repeat looking at the next value and adding until every ticket count has been used.
  2. B. Delete the first value so the table has only two showtimes.
  3. C. Print the word "data" before adding anything.
  4. D. Replace addition with subtraction because totals must shrink.

Question 8 of 10

Which written pattern correctly represents "report how many Puddlewatch days were warmer than 70" using the readings 71, 68, and 74?

  1. A. Set count to 3 immediately, because there are three days in the table.
  2. B. Add 71 + 68 + 74 and report 213.
  3. C. Start count at 0. Look at each reading one at a time; if it is greater than 70, add 1 to count. After the last reading, report count (here 2).
  4. D. Report only 68, because it is the reading that is not warmer than 70.

Question 9 of 10

A diagram of a library algorithm is described in words: arrow from "next checkout number" to "add to running total," then back to "next checkout number" until the list ends, then "report total." What does the return arrow represent?

  1. A. Erasing the table after the first title
  2. B. Processing the next value in the data set the same way, one at a time
  3. C. Skipping every other title automatically
  4. D. Converting checkouts into ticket sales

Question 10 of 10

Lampwick wants the showtime with the most tickets. A student suggests, "Look at 18, 41, and 36 all at once in an array, then pick." Which response best matches this topic's way of representing the algorithm?

  1. A. The algorithm cannot be described until arrays are used.
  2. B. Ticket data cannot be planned with a table.
  3. C. A running total is the only allowed algorithm for any data set.
  4. D. The same idea can be written as numbered steps: start with the first count, compare each later count one at a time, and keep the showtime of the larger count.