1 of 11

EarSketch

Debugging Logic

2 of 11

How does the image on the left relate to �the number one downloaded song ringtone of 2015?

3 of 11

Where are errors shown in EarSketch?

4 of 11

How do I print variables to the console for debugging?

  • Click on Archived Lesson 15.1 in the curriculum panel and paste and run the code titled “Printing Demo” to see how different data types are printed.

Python

5 of 11

How do I print variables to the console for debugging?

  • Click on Archived Lesson 15.1 in the curriculum panel and paste and run the code titled “Printing Demo” to see how different data types are printed.

Javascript

6 of 11

How can I use print statements to debug?

  • Click on Archived Lesson 15.2 in the curriculum panel to read over the debugging process.
  • Watch the video explanation of how to use print statements to debug an error.

7 of 11

Types of Errors Mini Task

  • Code the following types of errors on separate lines or separate parts of code.
    • Syntax
    • Runtime
    • Logic
  • Switch their code with their partner to see if their partner can fix the errors

8 of 11

What have we learned?

  • When we started, we defined what we
    • Already know
    • Wanted to know
  • Have we learned
    • What we wanted to know
    • Other information that we did not think about before

9 of 11

Work on the Ringtone Challenge�

10 of 11

Final Questions

  1. Which of the following is not a recommended technique for debugging?
    1. Copying and pasting code into Google
    2. Printing variable values to the console
    3. Looking at error lines identified in the console
    4. Asking others for help

11 of 11

Final Questions

  1. Which of the following is not something that can be printed to the console?
    1. Strings
    2. Code Comments
    3. Variables
    4. Mathematical Expressions