Skip to main content

shopping_debugging_exercise.py


# shopping
a=3   # number of apples
o=0.0   # number of oranges
print 'you have:    ',a,'oranges and',o,'apples'
buy_a=4   # apples you buy
buy_o=6   # oranges you buy
print 'you buy:     ',buy_a,'apples and',buy_o,'oranges'
a=a+buy_A
o=o+buy_o
PRINT 'you now have:',a,'apples and',o,'oranges'