Skip to content

Course home

Sign up

Computational thinking

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
Question 85

An automated deep-sea telemetry system logs sonar depth measurements during a research cruise.

# ----- Global Constants & State -----
SONAR_READINGS = [124.5, 128.2, 119.0, 131.4, 122.8]

# ----- Utility Functions -----
def processDepthData(readingsList):
    cleaned = [r for r in readingsList if r > 0]
    avg_depth = sum(cleaned) / len(cleaned)
    variance = sum((x - avg_depth) ** 2 for x in cleaned) / len(cleaned)
    standard_dev = variance ** 0.5
    return round(standard_dev, 2)

# ----- Mission Control -----
mission_active = True
if mission_active:
    dispersion = processDepthData(SONAR_READINGS)
    print("Telemetry dispersion metric:", dispersion)

Identify the computational thinking technique employed when the mathematical complexity of cleaning data, calculating the variance, and computing the standard deviation is encapsulated within processDepthData(), thereby allowing the main mission control segment to retrieve the dispersion metric without managing these mathematical steps.

[1]
Markscheme

Computational thinking Questions

  1. GCSE
  2. /Computer Science
  3. /Computational thinking

Question bank