Coding · Grade 11
Security, Reliability and Automated Testing
Built around one realistic task, testing a search algorithm, this course teaches learners to trace binary search, state its input assumptions, reason about edge cases and efficiency, inspect and repair broken implementations, and design test suites that catch realistic bugs. It closes with reliability and security practices for untrusted input: validating preconditions, bounded execution, toy datasets and safe failure. Learner code is never executed; tests are checked against a reference and registered buggy versions.
- 5 lessons
- About 110 minutes
- Trace, debug and test check: 10 questions
- Ways to answer: choose an answer, put code in order, trace code, highlight a text, match pairs and type a number
What learners will discover
- Trace binary search on a sorted list, recording low, high and mid at every probe, and predict its result.
- State binary search's preconditions, identify its edge cases and explain why its worst case grows logarithmically.
- Inspect a broken implementation, find the defect with a failing case, and choose and justify a repair.
- Design test cases that catch realistic bugs and explain why passing a few public examples does not prove correctness.
- Apply reliability and security practices to code that handles untrusted input: validate at the boundary, bound execution, test on toy data and fail safely.
Lessons
-
Trace a binary search 7 steps3 practiceabout 20 min
-
Input assumptions, edge cases and efficiency 8 steps4 practiceabout 20 min
-
Inspect a broken implementation 8 steps5 practiceabout 22 min
-
Write tests that catch bugs 7 steps4 practiceabout 22 min
-
Reliability and security with untrusted input 5 steps3 practiceabout 18 min
-
Trace, debug and test check 10 questions at the end
Keep exploring
More 11th grade coding
- 11th Grade Coding Worksheets12 printable worksheets
Guide for grown-ups
- How to start homeschooling: a step-by-step guide for familiesA guide for parents · 7 min read