Debugging Activity
IPO Problems

 


How much is that doggie in the window? (including sales tax)

Pat Shopboys runs a popular animal supply store. She needs to write a program that will calculate the total cost of the sale.

 

Write a Python script that conforms to the following

 

Consider the following solution. It consists of code with proper syntax. That means that when you save it in your IDE (like Thonny) it will save properly and not produce any errors at that point. But when you run it it might crash in certain situations (error #1) and it always produces wrong results (error #2).

Sometimes students will tell me "It works. But it doesn't give the right answers." [For reference, then it doesn't "work"!]

Identify the two errors in this program: