Sub-Procedures (OCR A-Level Computer Science): Quizzes
📚Quizzes
Practise the questions
10 questions from this quiz
ShowHide
Practise the questions
10 questions from this quiz
What is a sub-procedure?
What is a sub-procedure?
A reusable block of code that performs a specific task
What distinguishes a function from a procedure?
What distinguishes a function from a procedure?
Functions return a value after execution
How do sub-procedures provide modularity?
How do sub-procedures provide modularity?
They break programs into smaller sections
Which benefit allows sub-procedures to be used in multiple places?
Which benefit allows sub-procedures to be used in multiple places?
Reusability
How do sub-procedures ease maintenance?
How do sub-procedures ease maintenance?
Changes can be made in one place
What is the first step in identifying sub-procedures?
What is the first step in identifying sub-procedures?
Analyse the problem into smaller tasks
What is the purpose of parameters in sub-procedures?
What is the purpose of parameters in sub-procedures?
To pass data into them, making them flexible
What does a structure diagram show?
What does a structure diagram show?
Hierarchical organisation of tasks
How do sub-procedures simplify debugging?
How do sub-procedures simplify debugging?
Errors can be isolated within them
What is a common mistake when designing sub-procedures?
What is a common mistake when designing sub-procedures?
Making them perform multiple tasks
