Grades 11–12
Test Case Challenge
Choose the test that exposes the bug. Get 4 of 6 right to earn the badge.
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
See the program Advanced Python — object-oriented programming, testing and architecture — ending in a portfolio capstone.