logo

AQA A-Level Computer Science practice

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.

Try the question first, then check the answer and practise the same topic again.

At a glance

Question

Type

practice

Style

Topic

Abstraction and automation

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.

Related flashcards

No flashcards are published for this page yet.

Related practice questions