5Easy
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]

Decomposition and abstraction Questions

Practise Edexcel GCSE Computer Science Decomposition and abstraction with exam-style questions for GCSE Computer Science. 26 questions covering Benefits of decomposition and abstraction and Benefits of subprograms, matched to the Edexcel GCSE Computer Science (1CP2) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Decomposition and abstraction Questions

  1. GCSE
  2. /Computer Science
  3. /Decomposition and abstraction