Tools and techniques for debugging
Sometimes, our code runs but it’s not giving the correct outcome. Well, it’s up to us to discover why that’s the case. It can be annoying and frustrating and drive us mad, wondering whether we can even code at all. Even my human, who’s coding for 20+ years, breaks down crying on day five of trying to find a problem, occasionally.

What should you do? Well, take a break, get some fresh air, get some rest, eat some chocolate chip cookies or ice cream (optional step), and try again later. As you get more experienced, your faith in being able to find the bug eventually will grow stronger.

Let’s talk about some steps you can take to find the bug.
Print statements
My first step is debatable. It’s frowned upon by many, but I dare to claim that most of us do it as a first step. Just put a quick and dirty print() in to see what’s going on. Let’s say that we are adding three pets...