Subroutines that Return Values (AQA GCSE Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
What is the key difference between functions and procedures?
What is the key difference between functions and procedures?
Functions return values, procedures don't
Which keyword is used in AQA pseudocode to send a value back from a function?
Which keyword is used in AQA pseudocode to send a value back from a function?
RETURN
What are variables created inside a function called?
What are variables created inside a function called?
Local variables
What does it mean when a variable has local scope?
What does it mean when a variable has local scope?
It only exists inside that function
Can local variables be accessed from the main program?
Can local variables be accessed from the main program?
No, they cannot be accessed
What happens to local variables when a function finishes running?
What happens to local variables when a function finishes running?
They disappear
What error occurs in Python when accessing a local variable from outside its function?
What error occurs in Python when accessing a local variable from outside its function?
NameError
Why is local scope considered a good thing?
Why is local scope considered a good thing?
Prevents parts interfering with each other
What is modularisation in relation to functions?
What is modularisation in relation to functions?
Breaking program into smaller chunks
What does reusability of functions mean?
What does reusability of functions mean?
Using functions multiple times
How does using functions make maintenance easier?
How does using functions make maintenance easier?
Only need to update code in one place
What does 'clear interfaces' mean as a benefit of functions?
What does 'clear interfaces' mean as a benefit of functions?
Clear inputs and outputs
