31Easy
0/1

An automated irrigation controller regulates water flow through a greenhouse manifold.

1      # ----- Calibration Constants -----
2      VALVE_COEFFICIENT = 1.42
3
4      # ----- Helper Functions -----
5      def compute_flow_rate(pressure_psi):
6          return pressure_psi * VALVE_COEFFICIENT
7
8      # ----- Execution Flow -----
9      system_pressure = float(input("Enter current manifold pressure (PSI): "))
10     target_flow = compute_flow_rate(system_pressure)
11     print("Calculated discharge rate: ", target_flow, "L/s")

State the name of the computational thinking technique demonstrated by hiding the complex mechanical details of the valve's internal friction and chamber geometry, and instead representing it solely by the simplified input-output relationship in the compute_flow_rate subprogram.

[1]
PreviousNext

Computational thinking Questions

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