Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Coordinate System Exercises [2/11]

The given program draws a disc touching the left edge of the screen.

The disc touches the left edge of the screen because the radius is equal to the x coordinate.

Exercise Coord 2-1 output image

Exercise 1: Draw a disc touching the top edge of the screen, of the color azure with a radius of 90 pixels.

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

Solution 1

disc(480, 90, 90, /azure);
Exercise Coord 2-2 output image

Exercise 2: Draw a disc touching the bottom edge of the screen, of the color pink with a radius of 90 pixels.

Solution 2

disc(480, 720-90, 90, /pink);
Exercise Coord 2-3 output image

Exercise 3: Draw a disc touching the right edge of the screen, of the color gold with a radius of 90 pixels.

Solution 3

disc(960-90, 200, 90, /gold);

Loading...