Teaching at home? The family edition is the same lesson, written for a parent and one to three kids.

Slides for the board (PowerPoint, 12 slides) Lesson PDF Google Slides: upload the PowerPoint file to Google Drive and open it with Google Slides.

Football Play Lab: The Route Tree, Procedures with Parameters

Grades 8-10 · 45 minutes · Computer science

Level 7 of Football Play Lab wants 10 yards against Cover 1 on a route from the route tree. In Python, each route is a procedure with its depth as a parameter: me.out(10) runs 10 yards, cuts out and runs 5. The starter calls me.curl(8), which is caught 9.7 yards past the line, just short. Changing the argument to 10 passes. Students then fill in a table: out, curl, dig, slant, corner and post at different depths, each a single changed line, and find that the deepest is not always best. Finally they write the out by hand, run, cut, run, and see that the level says no route: it is the same path, but the level checks which procedure was called. They write a procedure of their own with def.

At a glance

Essential question

Why is a route a procedure, and what does its parameter change?

Objectives

Students will be able to:

  • call a procedure with an argument and say what the argument changes
  • test one procedure at several arguments and record each result
  • compare procedures that share a parameter and explain why one route beats a defense and another does not
  • write a procedure of their own with def and a parameter
  • explain why a program that does the same steps by hand is not the same as calling the named procedure

Vocabulary

Procedure, Parameter, Argument, Route tree, Cover 1, def

Standards

2-AP-14, 2-AP-17, 3A-AP-17

Time and materials

45 minutes, grades 8-10.

  • One computer or Chromebook per student
  • A projector
  • The worksheet and exit ticket, one copy each per student
  • The rubric, one copy per student if you grade the work

Prep

Make copies of the worksheet and exit ticket. Before class, open mytekdev.com/try/footballplaylab?lesson=the-route-tree-procedures-with-parameters&ref=tpt-footballplaylab-3 once on a student computer, which checks that your school's filter allows the app, and follow the short guide yourself: about ten minutes.

Assessment

  • Formative: the questions under What to look for, asked while students work, and the exit ticket (answer key included).
  • Summative: the worksheet, scored with the rubric.

Technology and privacy

Runs in any browser, Chromebooks included, with nothing to install. Students need no account and no email: the link works signed out, and nothing they do is stored on our server unless they choose to save.

Lesson sequence

MinutesStageWhat you doWhat students do
0 to 5Warm-up
Hook
Show the title, essential question and Today I can slides (about 1 minute). Then the warm-up: changing the time in a recipe.Answer the warm-up on the worksheet.
5 to 13Direct instruction (I do)
Model it
Project Level 7. The field fills the middle, seen from high behind the offense: the student's five players in team colors with flag belts, the five defenders in gray. Each player has a chip, C, Q, X, Y and Z, and each chip opens that player's own program in the Blocks and Python tabs. The box on the field says the level's goal and, after each play, what happened and why, with the seconds and the yards. The panel at the bottom right says the time since the snap, where the ball is, and how open the target receiver is. Open X's chip in Python: one line, me.curl(8). Open Help, How it works, and read the route tree paragraph aloud. Ask what curl(8) will do, then press play. Caught 9.7 yards past the line: 0.3 short.

It's working when: Q's program drops back 3 yards, waits 0.6 seconds and throws to X. Every route in the table uses the same quarterback, so only the route changes.

Predict, watch, and fill in the vocabulary on the worksheet.
13 to 22Guided practice (We do)
One argument
Students open the link or scan the QR code. A short guide walks them through curl(8), the change to curl(10), and the pass. Then they try me.out(8), me.out(12) and me.out(15), one at a time.

Watch for: Students who type out(10) without me. in front. The box names the line with the mistake.

Follow the guide. Start the route table with curl and out.
22 to 37Independent practice (You do)
The whole tree
Students fill in the table: dig(10), slant(3), slant(5), corner(8), post(10). Then they write the out by hand (me.run(10), me.cut("out"), me.run(5)) and play it, and write a route of their own as a def with a depth parameter. Each play runs in real time. Slower and Speed up, under the field, change the speed; the play button starts the level again from the beginning, with the programs as they are now. Walk the room with the What to look for questions.

If they ask: "out(12) gains 14 yards and out(15) is knocked away. What happens to the throw when the cut is later?" Deeper is not better

Watch for: Students whose own def gains a lot and still fails. The level checks for a route from the tree; their procedure is fine, and the Practice field (Levels menu) runs it against any defense with no rule about routes.

Fill in the route table, write the out by hand, and write one route with def.
37 to 45Closure
Why name a route? And exit ticket
Show the closure slide and take answers. Then name the idea: a procedure with a parameter is written once and called many ways, and testing the parameter finds where it works. Hand out the exit ticket.Discuss, then answer the exit ticket.

Before you teach: a ten-minute walkthrough

Open mytekdev.com/try/footballplaylab?lesson=the-route-tree-procedures-with-parameters&ref=tpt-footballplaylab-3. A short guide opens over Level 7, The route tree, in the Python tab on X's program. The field fills the middle, seen from high behind the offense: the student's five players in team colors with flag belts, the five defenders in gray. Each player has a chip, C, Q, X, Y and Z, and each chip opens that player's own program in the Blocks and Python tabs. The box on the field says the level's goal and, after each play, what happened and why, with the seconds and the yards. The panel at the bottom right says the time since the snap, where the ball is, and how open the target receiver is.

  1. The starter. X: me.curl(8), run 8 yards and stop. Q: me.drop(3), me.wait(0.6), me.throw_to("X"). C, Y and Z run 20 yards straight. The defense is Cover 1. The pass is caught 9.7 yards past the line; the level wants 10.
  2. The route tree. Help, How it works, lists it: out(depth) runs depth yards, cuts out and runs 5; curl(depth) runs and stops; dig(depth) cuts in and runs 8; slant(depth) runs and cuts in at 45 degrees; post(depth) and corner(depth) break deep to the middle and to the sideline; go() runs straight.
  3. Card seven. Put these blocks in for me puts in out(10) with the same quarterback, in Blocks. The guide uses the Python tab instead; a student who presses the card can go back to Python with Start from my blocks.
  4. Speed. Each play runs in real time. Slower and Speed up, under the field, change the speed; the play button starts the level again from the beginning, with the programs as they are now. The play is the same on every run and every computer, so every student who makes the same change sees the same numbers.
  5. Numbers to expect. curl(8) 9.7, short of 10; curl(10) 11.8; curl(12) knocked away; out(8) 10.8; out(10) 12.4; out(12) 14.0; out(15) knocked away; dig(10) 10.8; slant(3) 10.3, only 1.6 yards clear; slant(5) knocked away; corner(8) 16.3; post(10) knocked away. The out by hand: 12.4 yards, refused as no route.
A student's own procedure can do well and still be refused. def double_move(depth): run depth, cut out, run 2, cut up, run 10, called as double_move(8), scores a touchdown on Level 7 and is refused as no route. That is the level's rule, not a fault in the procedure; the Practice field runs it with no rule about routes.

Background for the teacher

Football teams give every route a name and a number, so a whole play fits in a few words. A route tree is that list: each route is the same pattern run at different depths. In the app the routes are procedures, and the depth is the parameter. Nobody is ever hit: a defender who reaches the ball carrier pulls a flag from its belt, and the play is over there. The field and rules are modeled on the IFAF flag football rules for 5 on 5; the app is not affiliated with or endorsed by IFAF or any league.

Against Cover 1, each receiver is covered man to man and one safety plays deep in the middle. Routes that stop or break to the sideline get away from a defender who is running deep; routes that break to the middle, like the post, run toward the safety. Deeper routes give the defender more time to recover before the ball arrives, which is why a longer depth can fail.

Teams at every level study plays with video and data, and the people who do it include coaches, video coordinators, data analysts and the software engineers who build their tools.

What to look for

Ask these while students work. A student who has understood the lesson can answer them without help:

The fourth question is the one that matters. A student who says "the level checks which procedure was called, and the steps by hand are not a named route" understands what a procedure is. A student who says "it is a bug" has not seen the difference between the steps and the name.

Cross-curricular extensions

Vocabulary

ProcedureA named set of steps: me.out() is the out route.
ParameterA name in a procedure that stands for a value it is given: the out route's depth.
ArgumentThe value given when the procedure is called: the 10 in me.out(10).
Route treeThe set of named routes a team uses: go, out, dig, curl, slant, post and corner.
Cover 1A defense with man coverage on each receiver and one safety deep in the middle.
defThe Python word that starts a new procedure.

Differentiation

English learners

  • Keep the vocabulary slide up, and point at the receiver, the cornerback or the box on the field as you say each word: the picture carries the meaning.
  • Give a sentence frame on a card: me.____(____) runs the ____ route ____ yards deep.
  • Draw each route on the board as an arrow with its depth written beside it.

Students with IEPs or 504 plans

  • Pair students, one at the keyboard and one recording results.
  • Give the table pre-filled with the routes and depths; students write only the results.
  • Where the IEP allows a modified assignment, score the first two rubric rows only.

Students who need more support

  • Do the first four rows of the table together on the projector.
  • Keep Help, How it works open on the route tree paragraph.
  • The box on the field says what went wrong after every play, and Level 7 has a card.

Students ready for more

  • Write def double_move(depth): run depth yards, cut out, run 2, cut up, run 10. Call double_move(8) on the Practice field against Cover 1 and record the gain.
  • Give your procedure a second parameter, such as how far it runs after the cut, and test two values of each.
  • Write a procedure for the quarterback: def throw_after(seconds, who), and call it from Q's program.

Adapting for other grades

Younger students: In middle school, work in Blocks: the route tree blocks have a depth slot. Do the table together, and skip the def. Score the first two rubric rows, total 8, and 6 meets the objectives.

Older students: In grades 11 and 12, ask students to write the whole route tree themselves as defs with run and cut, then explain why the level still prefers the built-in names, and what a library is for.

Football Play Lab: The Route Tree, Procedures with Parameters

Student worksheet

Name: ______________________________ Date: ______________

Open the app: scan the QR code, or go to mytekdev.com/try/footballplaylab?lesson=the-route-tree-procedures-with-parameters

Essential question: Why is a route a procedure, and what does its parameter change?

Warm-up: A recipe says bake for 20 minutes. You change it to 30. What changes, and what stays the same? ________________________

  1. Vocabulary. Procedure, parameter, argument, route tree, Cover 1, def: write each in your own words.
  2. My route table. Gain, or what went wrong. curl(8): ______ curl(10): ______ curl(12): ______ out(8): ______ out(12): ______ out(15): ______ slant(3): ______ post(10): ______
  3. By hand. The out written with run, cut and run gained ______ yards, and the level said ______.
  4. My procedure. def ____________(________): what it does: ________________. Called with ____ and ____: ________ and ________.

1. What does the argument in me.out(10) change, and what does it leave the same?

2. Why is a deeper route not always better against Cover 1?

Football Play Lab: The Route Tree, Procedures with Parameters

Exit ticket

Name: ______________________________

1. In me.curl(10), the 10 is: (A) the procedure (B) the argument (C) the defense

2. out(12) gains 14 yards and out(15) is knocked away because: (A) the ball is slower (B) the later cut gives the defender time to recover (C) the level is broken

3. A friend copies the same five lines into every receiver's program. Use what you learned today to say what to write instead, and why.

Answer key: exit ticket

QuestionAnswerWhy
1BThe procedure is curl; 10 is the value its depth parameter gets.
2BThe cut comes later, the ball arrives later, and the cornerback has caught up.
3Open answerA procedure with a parameter, written once with def and called with a different argument for each receiver, so a change is made in one place.

Worksheet: what students should find

BlankWhat the app shows
My route tablecurl(8) 9.7, short. curl(10) 11.8. curl(12) knocked away. out(8) 10.8. out(12) 14.0. out(15) knocked away. slant(3) 10.3. post(10) knocked away.
By hand12.4 yards; the level said no route.
My procedureAny def with a parameter, called twice, with both results recorded.
Question 1The depth before the cut or stop; the steps of the route stay the same.
Question 2A later break gives the defender time to recover before the ball comes down.
The play is the same on every run and every computer, so a student whose numbers differ changed another line too, such as the quarterback's wait.

Rubric

Score each row from 1 to 4.

Name: ______________________________

Criteria4 Exceeds3 Meets2 Approaching1 Beginning
Using the parameterExplains what the argument changes in each route, and why the same route fails at another depth, with the table.Changes the argument and says what it changes.Changes the argument without saying what it does.Does not change it.
The route tableFills in all eight rows and finds a pattern in what fails.Fills in all eight rows.Fills in some rows.Does not fill it in.
Writing a procedureWrites a def with a parameter, calls it with two arguments, and records both.Writes a def with a parameter and calls it.Writes a def without a parameter.No procedure.

Total: ____ / 12. A score of 9 or more meets the objectives.

Standards

The lesson is built for CSTA 2-AP-14: students call procedures with parameters, test the argument, and write their own with def. Splitting a play into named routes is 3A-AP-17 for grades 9 and 10.

FrameworkCodeGradesStandardHow the lesson meets it
CSTA 20172-AP-146-8Create procedures with parameters to organize code and make it easier to reuse.Students call route procedures with a depth parameter, compare results across arguments, and write a procedure of their own with def.
CSTA 20172-AP-176-8Systematically test and refine programs using a range of test cases.Students test eight route and depth combinations against one defense and record each result.
CSTA 20173A-AP-179-10Decompose problems into smaller components through systematic analysis, using constructs such as procedures, modules, and/or objects.Students decompose a play into named procedures, one route per receiver, and see why the level checks for the named procedure rather than the same steps written by hand.

Checked November 2026 against: CSTA K-12 Computer Science Standards, Revised 2017.

Optional: save student work in a free class

The whole lesson runs at the link on the worksheet, with no accounts and no sign-up.

To keep students' work, and see it all in one place, make a free class. It takes about ten minutes, once, and covers every lesson in this series: mytekdev.com/tools/class-setup

Students in a class open mytekdev.com/tools/football-play-lab/lessons/the-route-tree-procedures-with-parameters/start instead of the worksheet link. Each one gets their own copy of the starter, and the same link reopens it next time.