Year 11

Subroutines

Link copied to clipboard

Year 11

Subroutines

Link copied to clipboard

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. In this lesson, we will formalise our definition of a subroutine. We will find out why they are used in programming and we will also learn how to pass values to them.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

3 Questions

Q1.
In the image above, how many parameters does the subroutine "calculate" take?
An image in a quiz
1
Correct answer: 2
3
4
Q2.
In the image above, which one of the statements below best describes what is happening at line 10?
Correct answer: It calls the calculate subroutine using num1 and num2 as arguments
It is adding a and b but will not output the answer until the subroutine has been called
It will prompt the user to enter two numbers
The subroutine calculate is being created/defined.
Q3.
Using the image above, on line 1, are "a" and "b" described as arguments or parameters?
Arguments
Correct answer: Parameters
This site uses cookies to store information on your computer. Some of these cookies are essential, while others help us to improve your experience by providing insights into how the site is being used.