Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Simple Graphics [3/15]

The step of the for loop equals -50, and the initial value (800) is greater than the bounding value (100). This causes the discs to be drawn from right to left.
[Run the program]

Exercises:

1. Insert the statement println "x: ", x; just above the disc statement.
[Run the program]

2. Change the program so that the discs are drawn farther apart.

After you have solved an exercise, it is recommended to always examine the provided solution.

Note: Sometimes there can be multiple correct answers, so the provided solution may not match exactly with your solution.

Solution

for #x=800..100 -=75

Loading...