Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Simple Motion [7/10]

This program animates two moving discs. The blue disc moves twice as fast as the red one.
[Run the program]

The disc procedure has the form:
disc(x, y, radius, color)

Exercises:

1. Try changing the arguments 200 and 300 in disc procedure calls to some other values in the range from 0 to 700.

2. Set the second argument of the blue disc procedure call to an expression 2*i to make the blue disc move diagonally.

3. Set the third argument of the red disc procedure call to an expression i/2 to make the red disc grow in size.

Loading...