Please read this Getting Started / Processing.org
Unfortunately it’s policy not to do homework in this forum
Show your attempt and we can help
here is a starting point:
void setup() {
size(480, 120);
}
void draw() {
if (mousePressed) {
fill(0);
} else {
fill(255);
}
ellipse(mouseX, mouseY, 80, 80);
}