A sample is one volume measurement

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

A sample is one volume measurement

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does one sample of a sound wave record?
A The volume of the wave at one moment in time
B The whole song from start to finish
2. How is one sample stored in a digital system?
A As one whole number (an integer)
B As a smooth, continuous wave
3. On a waveform graph, what does each sample look like?
A A long line covering the whole wave
B A dot placed on the wave at one point in time
4. When a computer takes many samples of a sound, when are the measurements taken?
A At equal time steps, such as every tiny fraction of a second
B At random times whenever the computer feels like it
5. If you take 5 samples of a sound wave, how many numbers do you store?
A 1 number for all 5 samples together
B 5 numbers, one for each sample

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1sample = 142 Avolume_at_0_01s = 57
2samples = [0, 40, 90, 40, 0] Btimes = [0.00, 0.01, 0.02, 0.03]
3A sample is one volume measurement at one moment, stored as a whole number. CThe time steps are not equal because the gap jumps from 0.01 to 0.04 between samples. Samples must be taken at equal time steps.
4Samples are taken at equal time steps, so each dot on the waveform is the same time apart. DA list of samples taken at equal time steps, each one a dot on the waveform.
5sample = 12.5, 80, 33 EOne sample is a single measurement of the sound's volume at one moment, stored as one whole number.
6times = [0.00, 0.01, 0.05, 0.06] FA sample is only ONE measurement stored as one whole number. This line tries to store three values, one of them a decimal.

Definitions

sample

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
sample = _____(6.7)
2.
samples = [2, 5, 9, 6, 3] print(___(samples))
3.
for i in range(4): t = i _ 0.25 print(t)
4.
samples = [2, 5, 9, 6, 3] print(samples[_])
5.
samples = [2, 5, 9, 6, 3] for s in samples: dot(_)

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A wave = [0, 3, 7, 3, 0]
B samples = []
C for volume in wave:
D samples.add(volume)
Question 2
A sample = 7.5
B print("Volume:", sample)
C print(type(sample))
Question 3
A time = 0
B step = 2
C time = time * step
D print(time)
Question 4
A samples = [2, 6, 9, 4]
B first = samples[0]
C last = samples[4]
D print(first, last)
Question 5
A wave = [0, 4, 8, 4]
B for t in range(len(wave)):
C print(t, wave)

Answer Key

A sample is one volume measurement
Section A: Quick Questions
Q1
A — The volume of the wave at one moment in time
Q2
A — As one whole number (an integer)
Q3
B — A dot placed on the wave at one point in time
Q4
A — At equal time steps, such as every tiny fraction of a second
Q5
B — 5 numbers, one for each sample
Section B: Match the Pairs
Q1
sample = 142 → One sample is a single measurement of the sound's volume at one moment, stored as one whole number.
Q2
samples = [0, 40, 90, 40, 0] → A list of samples taken at equal time steps, each one a dot on the waveform.
Q3
A sample is one volume measurement at one moment, stored as a whole number. → volume_at_0_01s = 57
Q4
Samples are taken at equal time steps, so each dot on the waveform is the same time apart. → times = [0.00, 0.01, 0.02, 0.03]
Q5
sample = 12.5, 80, 33 → A sample is only ONE measurement stored as one whole number. This line tries to store three values, one of them a decimal.
Q6
times = [0.00, 0.01, 0.05, 0.06] → The time steps are not equal because the gap jumps from 0.01 to 0.04 between samples. Samples must be taken at equal time steps.
Section C: Definitions
Q1
sample — One measurement of a sound wave's volume at a single moment in time, stored as one whole number. Many samples taken at equal time steps are dots on the waveform.
Section D: Fill in the Blanks
Q1
sample = round(6.7)
Q2
samples = [2, 5, 9, 6, 3] print(len(samples))
Q3
for i in range(4): t = i * 0.25 print(t)
Q4
samples = [2, 5, 9, 6, 3] print(samples[0])
Q5
samples = [2, 5, 9, 6, 3] for s in samples: dot(s)
Section E: Spot the Error
Q1
D — Python lists have no add method. Use append to store each sample (one volume number) in the list: samples.append(volume).
Q2
A — A sample is stored as one whole number (an integer), so 7.5 is wrong. It should be a whole number such as sample = 7.
Q3
C — Samples are taken at equal time steps, so each step is added to the time. Multiplying leaves time at 0. It should be time = time + step.
Q4
C — The list holds 4 samples, numbered 0 to 3. Index 4 does not exist and causes an error. The last sample is samples[3].
Q5
C — One sample is one number. Printing wave shows the whole list, not a single sample. It should be print(t, wave[t]).