NowPrice:AU$7.89

Original Price: AU$10.53

Loading

25% off

Sale ends on 31 August

GST Included

Python Debugging Practice Worksheet | 8 Find-the-Bug Problems + Answer Key PDF

Includes Etsy Purchase Protection

You can only make an offer when buying a single item.

Highlights

  • Digital download

8 debugging problems where the code is already written and something is wrong. You read the error message or spot the wrong output, find the bug, and fix it. The bugs are the ones beginners actually run into, not contrived edge cases.

What's included:
- NameError from a typo in a variable name
- IndexError on an empty list, fixed with an empty-list guard
- Missing return statement (function builds the result correctly but returns None)
- KeyError fixed with dict.get(key, default)
- Accumulator variable reset inside the loop instead of before it
- Off-by-one: range(1, 5) stops before 5, so 5 never prints
- Mutable default argument (lst=[]) shared across all calls
- Logic bug where n % 2 == 1 misidentifies negative even numbers

Each problem shows the error message or wrong output upfront, same as a real debugging scenario. Full fix and explanation included for each one.

Made-to-order download

Files will be available after the seller completes your order.  Here's how.

Made-to-order digital items don’t accept returns or exchanges. Please contact the seller about any problems with your order.

Etsy Purchase Protection
Shop confidently on Etsy knowing if something goes wrong with an order, we've got your back for all eligible purchases — see programme terms

You may also like