Learn Create Your Own Split Screen

Next Page

Remember we created a fillCircle function in a previous section?

We're now going to reintroduce that function and use it in combination with RandInt.

Having both functions lets us do things like this:

fillCircle(RandInt(300), RandInt(300), RandInt(30));
This draws a circle with a centre located in a random x and random y location on the canvas (our canvas is currently 300 x 300), and with a random radius between 0 and 29. A zero radius circle isn't all that exciting, so we'll add one to that.
Try making trivial changes to the code below - even just over-typing some spaces. The program will re-execute each time and you'll get a new random circle.