From the course: Programming Foundations: Beyond the Fundamentals

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Challenge: Debugging

Challenge: Debugging

(lively music) - Ready for another challenge? Now that you're familiar with the basics of debugging, try your hand at finding and fixing basic errors in some Python code. The start file for this video is supposed to recommend a house plant based on the level of care the user can give: low, medium, or high but when I run it, I can see that it's not working. Here's a hint. This code contains a syntax error, a runtime error and a logic error. Remember, you can use both your IDE and the terminal output to identify where the interpreter encounters each error. We talked about how debugging can be challenging so if you get stuck, consider trying a trick that many developers are fond of. Explain your code to a rubber duck. When I type one of three keywords, the program should recommend a house plant but it's not returning anything. Maybe I need to look at those if and elif statements and look for possible errors there.…

Contents