Skip to main content
Predict which variable each line uses, then fix a counter that stops with an UnboundLocalError and replace its global with a return value. Open Lab 29 in the IP Lab Portal

What you will practice

  • Spot local and global names
  • Reproduce and fix an UnboundLocalError
  • Refactor a global into a return value

Before you start

Time

15 minutes

Where

IP Lab Portal

Module

Module 11: Flexible arguments and scope

  • In the IP Lab Portal, open Lab 29 - Scope detective.
  • In class, this lab comes right after the Lesson 4 recap slide in Module 11 core material.