Community resourceWorksheet

1CP2-CT-3.5 Procedures and parameters

Part 5 of 7 · 1CP2-CT-3 · Lists, iteration and subprograms

The first subprogram worksheet, separating defining a procedure from calling it, then adding parameters.

Students will:

  • tell the definition of a procedure apart from a call to it
  • predict the output order of a program that calls procedures
  • write a procedure that takes one parameter
  • pass two arguments in the correct order
  • explain how a procedure supports separation of concerns

Inside: 7 explanation cells, 3 multiple-choice questions, 2 Python tasks, 1 fill-in-the-blanks cell and 2 written answers. 18 marks, about 45 minutes.

Series: 1CP2-CT-3 · Lists, iteration and subprograms, part 5 of 7.

Shared by Coding PathwayVerified teacher

  • 15 cells
  • About 45 minutes
  • CC BY-SA 4.0
  • Shared 17 Aug 2026

Preview

The whole resource, exactly as a class sees it. Answers and marking are held back.

Procedures and parameters

A subprogram is a named, reusable section of code that performs one defined job. A procedure performs an action when it is called. It can receive data through parameters.

Subprograms support decomposition and separation of concerns: each named part can focus on one responsibility.

1. Define once, call when needed

Calls, parameters and return valuesmain programthe call supplies argument valuesprocedureparameter receives valueperforms an actionfunctionparameter receives valuecalculates a resultargument entersargument entersreturn value goes back to the call

def show_badge(name):
    print("Learner: " + name)

show_badge("Sam")
show_badge("Rae")

name is a parameter, a local placeholder in the definition. "Sam" and "Rae" are arguments, the actual values supplied by calls. Defining a procedure does not run its body. A call runs it.

Fill in the blanks3 marks
A named reusable section is a gap 1. A placeholder in its definition is a gap 2. The actual value supplied by a call is an gap 3.
  • argument
  • call
  • parameter
  • subprogram
  • variable

2. Follow definition and calls

Read the listing without running it. The body runs only for the two calls.

def announce(event):
    print("Next: " + event)

announce("Robotics")
announce("Games")
Multiple choice1 mark

Which option gives the exact output order?

  • A`Next: event` once
  • B`Robotics` then `Games`
  • C`Next: Robotics` then `Next: Games`
  • DNo output because the procedure has no return
Written answer2 marks

Explain the difference between defining announce and calling announce("Robotics").

Identify what Python stores first and when the indented body runs.

Students type their answer here.

3. Write a one-parameter procedure

Define a procedure named show_double with one parameter named number. It must calculate and print double the argument. Then call it with 6 and with 9.

The procedure performs the output action itself, so no return value is required.

Coding task4 marks
# Define show_double(number), then call it with 6 and 9.

4. More than one parameter

Parameters are positional: each argument is matched to the parameter in the same position.

def show_score(team, points):
    print(team + " " + str(points))

show_score("North", 8)

Here team receives "North" and points receives 8. str(points) converts the integer before concatenation. Reversing the arguments changes their meaning and would also make this expression invalid for those types.

Multiple choice1 mark

For def show_route(start, finish):, which call makes start equal "Library" and finish equal "Hall"?

  • Ashow_route(start, finish)
  • Bshow_route("Hall", "Library")
  • Cshow_route("Library", "Hall")
  • Dshow_route = ("Library", "Hall")

5. Independent procedure

Define show_total(price, quantity). It must calculate price * quantity and print the result. Call it with 4 and 3, then with 2.5 and 4. The exact outputs must be 12 and 10.0 on separate lines.

Keep the calculation inside the procedure so both calls reuse the same rule.

Coding task4 marks
# Define show_total(price, quantity) and make the two calls.
Written answer2 marks

Explain how moving a repeated display rule into a procedure supports separation of concerns and future maintenance.

Link one responsibility to one place where a change is made.

Students type their answer here.

Multiple choice1 mark

Which statement about a parameter is correct?

  • AIt is the output printed by a procedure.
  • BIt is a placeholder named in a subprogram definition.
  • CIt is always a global constant.
  • DIt is the keyword used to end a loop.

Route forward

You can define and call procedures with parameters. Next you will create functions that calculate and return values for the calling program to use.