Grades 11–12

Test Case Challenge

Choose the test that exposes the bug. Get 4 of 6 right to earn the badge.

Part of Coding Pathway (Python): Python Level 3 & Portfolio

Question 1 of 6 · Score 0

Which test catches the bug?

def average(nums):
    return sum(nums) / len(nums)

What this game teaches

  • Edge cases: empty, zero, negative, boundaries
  • Writing tests that fail for the right reason
  • Why testing is part of real software work

Play together

  • Think of edge cases for everyday rules (“kids under 12 eat free”).
  • Explain why the other tests would pass.
Want more? This game comes from Coding Pathway (Python): Python Level 3 & Portfolio

Advanced Python — object-oriented programming, testing and architecture — ending in a portfolio capstone.

See the program

More Coding games

All arcade games