|
Fill in the blanks so the loop is correct for a program that is to draw a row of ten circles. A good answer might be:An answer is given below. | |
Loop Options
All that you need is for the loop to iterate 10 times. Each iteration will (when we get to that part) draw one red circle. There are many ways you could have filled in the blanks so that the loop iterated 10 times, but usually it is best to have a counter that goes from 1 to 10, or from 0 to 9. Sometimes the aritmetic is easier if the loop goes from 0 to 9, so that is what I chose here. Now that the "infrastructure" is in place, let us focus on drawing the circles. The idea is to draw 10 circles in a row, nicely spaced out across the screen. | |
QUESTION 11:The applet's drawing area is 300 pixels wide. If there are to be 10 circles, how wide is the area which will be used for each circle? Click Here after you have answered the question |