Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Coordinate System Exercises [9/11]

This program draws a red disc and a line of blue discs.

Exercise Coord 9-1 output image

Exercise: Draw pink lines connecting the center of the red disc with each of the blue discs.

If you can't solve this exercise, take a peek at the solution. You don't need to solve every exercise by yourself. A lot can be learned by simply reading the solution and applying it.

Solution

Insert this statement before the sleepMs statement:

line(300, 100, i, 680, /pink);

Loading...