Chapter 11 · Final
Debugging
调试
Syntax / runtime / semantic errors — what each one looks like and how to crack each. Read tracebacks bottom-up. Print debugging as the workhorse, pdb when print gets noisy. Strictly aligned with Think Python Appendix A.
Strict source: Think Python Appendix A
Lessons in this chapter
- 11.00 Worked ExampleWalkthrough: Print-Debug an Off-by-One例题: 用 print 调试 off-by-onepython-debugging8 min
- 11.01 ExerciseSpot the Bug找出 bugpython-debugging20 min
- 11.02 ExerciseRead the Traceback读 tracebackpython-debugging python-strings15 min
- 11.03 ExercisePrint vs pdbprint 和 pdbpython-debugging20 min
- 11.04 HomeworkHomework: Fix the Test Suite作业: 修复测试套件python-debugging40 min
🎓 Course complete
This is the final chapter of CSC 141. After completing it you can write any first-semester CS program from scratch, read someone else's broken code, and debug your own. The toolkit is complete — the rest is practice on real problems.