Skip to main content

4.9) Exercise 6 - Debbuging (Beginner)


Here is a simple program that adds apples and oranges (not with each other!).
shopping_debugging_exercise.py
There are 4 bugs in the code. Execute the program with IDLE, find the bugs and correct them one by one. The debugged program should print the following:

you have:     3 apples and 0 oranges
you buy:      4 apples and 6 oranges
you now have: 7 apples and 6 oranges