You are on page 1of 1

Display:

Quantity Price
10 50
20 100
30 150
40 200
50 250
60 300
70 350
80 400
90 450
100 500
It is important to note that both the for loop and while loop implementation of the price chart table are both
OK at getting the job done. However, the for loop is somewhat more compact and would be preferable in this
situation. In later lessons we will see where the while loop should be used instead of the for loop.

You might also like