Exercises — Claude for Education & Tutoring
Exercise 1: Baseline Implementation
Difficulty: Beginner | Time: 30–45 min
Implement a small function that transforms an input into a structured output relevant to Claude for Education & Tutoring.
Requirements
- [ ] Validates inputs with helpful error messages
- [ ] Returns a structured dict/object (not an unstructured string)
- [ ] Includes 2 unit-style checks in
__main__
Hints
- Start with the smallest happy path, then add validation.
- Keep the transformation deterministic.
Exercise 2: Add Realistic Constraints
Difficulty: Intermediate | Time: 45–75 min
Extend Exercise 1 with a constraint that mirrors real usage (latency budget, safety rule, formatting rule, etc.).
Requirements
- [ ] Constraint is explicit in the function contract
- [ ] Includes at least one edge case test
- [ ] Documents a trade-off you chose
Exercise 3: Production-Style Hardening
Difficulty: Advanced | Time: 75–120 min
Create a “mini module” version: - core logic - validation layer - instrumentation hooks (timings/logging placeholders)
Requirements
- [ ] Clear separation of responsibilities
- [ ] No secrets in code
- [ ] Includes a short README note in comments about operational risks
Stretch
Add a simple CLI entrypoint using argparse (optional).