0% found this document useful (0 votes)
2 views2 pages

Python - Parallel - Lists - Model - Paper

Another Model Paper On Parallel Lists

Uploaded by

stemboravishka
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Python - Parallel - Lists - Model - Paper

Another Model Paper On Parallel Lists

Uploaded by

stemboravishka
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

COMPUTER SCIENCE EXAMINATION

Practical Programming Component: In-Memory Parallel Array Processing

Paper Duration: 1.5 Hours Total Marks: 30 Marks

Assessment Focus: Index Coordination &


Language Reference: Python 3.x
Algorithmic Filters

Candidates Instructions:
• Answer all three questions. Each question is worth 10 marks.
• All datasets are embedded natively inside the question blocks as interrelated lists. Do not attempt to load
external data files.
• For every task, ensure you use proper index-bound tracking loops (e.g., range(len(...))) to coordinate
item mappings across parallel dimensions.

Question 1: Multi-Manifold Water Pump Audit [10 Marks]

An automated agricultural control framework captures telemetry statistics from irrigation manifolds. The
structural parameters are parsed into three synchronized, in-memory parallel arrays mapping individual pump
identifying keys, the continuous activation intervals (measured in minutes), and the running electrical demand
load (measured in Kilowatts).

Initial Global Code Segment:

# Parallel dataset: Index positions perfectly align across all three structures
pump_ids = ["Pump_A", "Pump_B", "Pump_A", "Pump_C", "Pump_B", "Pump_A"]
durations = [120, 60, 90, 180, 45, 150] # Values map to operational minutes
power_kw = [3.2, 5.5, 3.2, 1.5, 5.5, 3.0] # Values map to Kilowatts (kW)

Write an efficient Python program that embeds this dataset directly and addresses the following computational
instructions:

1. Implement a single loop structure to systematically iterate over the shared index boundaries of the parallel
arrays.
2. Apply a logical filter to extract runtime values matching exclusively for the unit "Pump_A".
3. Calculate the total electrical energy consumed in Kilowatt-hours (kWh) across the filtered instances using
the provided engineering metrics conversion formula:

Energy (kWh) = Power (kW) × (Duration (Minutes) / 60)

4. Print out a clear operational run log entry for each instance discovered, and display the final aggregated
consumption figure rounded to precisely one decimal place.

Computer Science Examination • Parallel Lists Processing Page 1 of 2


Question 2: Aquaculture Capacity Threshold Monitor [10 Marks]

An ornamental fish aquaculture facility manages live bio-loads using specialized digital registers. The live
capacity profiles are structured directly inside code across four distinct parallel vectors representing the
variant species strains, holding tank locations, absolute current stock volumes, and baseline safety thresholds.

Initial Global Code Setup:

# Parallel arrays tracking aquaculture holding sectors


species = ["Guppy_Red", "Neon_Tetra", "Goldfish_Oranda", "Guppy_Blue", "Zebra_Danio"]
tanks = ["Tank_01", "Tank_02", "Tank_03", "Tank_04", "Tank_05"]
current_stock = [450, 800, 120, 310, 750]
min_required = [500, 600, 100, 400, 500]

Construct a Python script that executes an automated threshold inspection loop:

1. Traverse the lists sequentially by coordinating data variables using synchronized index markers.
2. Evaluate whether the inventory recorded in current_stock falls strictly below the safety boundaries
specified in min_required.
3. For any item failing this capacity rule, calculate the exact restock deficit and output an explicit terminal
warning detailing the species name, target tank location, and the absolute replenishment count needed to
restore safe levels.

Question 3: Miyawaki Forest Plot Extreme Variations [10 Marks]

A high-density Miyawaki reforestation conservation project monitors sapling adaptation trends across different
plots. Digital survey instruments output data into three parallel arrays mapping plot designation labels, sapling
botanical classifications, and vertical heights (measured in centimeters).

Initial Global Code Setup:

# Parallel arrays tracking ecological plots


plot_zones = ["Plot_East", "Plot_West", "Plot_East", "Plot_North", "Plot_East",
"Plot_West"]
tree_types = ["Miyawaki_Mix", "Local_Kumbuk", "Miyawaki_Mix", "Teak", "Miyawaki_Mix",
"Local_Kumbuk"]
heights_cm = [45, 110, 55, 140, 38, 95]

Develop a Python program that handles the lists to perform a custom statistical evaluation:

1. Isolate matching index items where the plot_zones entry equals "Plot_East".

2. Design a custom search algorithm to identify the maximum height (tallest sapling) and minimum height
(shortest sapling) localized inside that specific sector. Constraint: You must not call built-in sequence
functions such as max() or min().
3. Print the finalized growth boundary analysis metrics clearly on the terminal screen.

Computer Science Examination • Parallel Lists Processing Page 2 of 2

You might also like