Exam-style question
Try this first
Using Python, write a small composition abstraction that combines three procedures: one to obtain data, one to process the data and one to display the result. Explain how the three procedures form a compound procedure.
Answer and explanation
Concise answer
def get_data(): return 8
Why this is correct
The answer demonstrates composition by combining several procedures into run_task. Each smaller procedure performs part of the operation, while run_task forms the larger compound procedure.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
