Week 11 ยท 45-60 min

Debugging and Error Handling

Week Summary

A quick preview of the main ideas in this week before you begin the slides.

  • What Is Debugging?
  • Types of Errors
  • Reading Error Messages
  • Using Print Statements to Debug

Glossary

Review these key terms before starting this week. They are kept simple so students can learn the new vocabulary before moving into the slides.

What Is Debugging?
What Is Debugging?
Types of Errors
Types of Errors
Reading Error Messages
Reading Error Messages
Slide 1๐Ÿ’ก

What Is Debugging?

Learning goal

Identify, understand, and fix errors in code.

Read one card at a time. Focus on the main idea first, then look at the visual on the right to help it stick.

Debugging means finding and fixing bugs.

It is a normal part of programming.

Reading error messages is an important debugging skill.

Testing small pieces of code helps isolate problems.

Patience and persistence matter a lot.

Remember

Debugging is not a failure, it is how programmers improve code.

What Is Debugging?

What Is Debugging?

Slide 1 of 8

Use arrows or dots to move through the lesson

Practice

  1. Write 2-3 sentences about what you learned this week.

Coming Next Week: Next: Review and Mini Projects

Project Brief

Complete the "Build a Command-Line Program" project across weeks 11-12.

What to Build

  1. Day 1: Choose a project type and sketch the program flow on paper.
  2. Day 2: Set up variables, input prompts, and the basic structure in Thonny.
  3. Day 3: Write functions for each major piece of logic.
  4. Day 4: Add conditionals to handle different outcomes or paths.
  5. Day 5: Add a loop so the program can repeat or process multiple items.
  6. Day 6: Add a list or dictionary to store structured data such as questions, scores, or items.
  7. Day 7: Add basic error handling with try/except for invalid input.
  8. Day 8: Test with normal, edge, and invalid inputs, then fix bugs.
  9. Day 9: Add comments explaining each important part of the code.
  10. Day 10: Present the program live and explain design choices and challenges.

Self-Assessment Rubric

  • Program runs without crashing โ€” 25%
  • Correct use of variables, loops, conditionals, and functions โ€” 30%
  • Use of a list or dictionary for data โ€” 15%
  • Code readability and comments โ€” 15%
  • Presentation and explanation of design choices โ€” 15%