Thisassignment must be done in Khan Academy.
New project link for Khan Academy below,
https://www.khanacademy.org/computer-programming/new/pjs
Please see attached videos to understand the output of the assignment
Starter code is given below,
Thank you
Start with a random # of randomly colored circles., then remove one circle at a time in draw() - so we need to clear the canvas area and redraw the remaining circles every time. Once the # of remaining circles become 0, restart the whole process - restart with another random # of colored circles and start removing one circle at a time.
Please look at the video1 for more clarity
The second part of the assignment is- once the # of remaining circles become 0 pause for few seconds before restart the whole process.Please look at the video2 for more clarity
The starter code is given here
/*
Start with a random # (1 to 100) of randomly colored circles., then keep removing one circle at a time: we need to use draw() and clear the canvas area and redraw the remaining circles every time. Once the # of remaining circles become 0, restart the whole process - restart with another random # of colored circles and start removing one circle at a time....
1. setupCircles will be a function that will start with a random number of circles 2. Wait until numCircles reaches certain negative value
3. Restart fresh by calling setupCircles again
*/
var x = [], y = [], colors = [];
var numCircles = 0;
var rate = 10;
frameRate(rate); // 10 frames per second
var setupCircles = function() { //decide # of circles
numCircles = floor(random(1,100));
//let us empty the circles' data first. x = [];
y = [];
colors = [];
//populate the data for that many circles! };
draw = function() { //clear canvas background(255);
};