# Sample sketch with variables, conditionals and a loop!

## the code!

``` //for green cirlce 1 int circleI = 15; float circleJ=10; //for green circle 2 int circleK=15; float circleL=10; //for purple stripe loop int stripe= 15;```

``` void setup(){ size(600,600); background(255,255,152); //purple stripe loop stroke (140,24,214); while (stripe< 500) { line (400,stripe,440,stripe); stripe=stripe+10; } } //diamond void mousePressed(){ noStroke(); //colors based on mouse position! fill(mouseX,mouseY,mouseX+mouseY,175); triangle(mouseX-50,mouseY,mouseX+50,mouseY,mouseX,mouseY+80); triangle(mouseX-50,mouseY,mouseX,mouseY-50,mouseX+50,mouseY); } //triangle void draw(){ stroke(234,50,127); fill(245,153,172,150); triangle(mouseX, mouseY-50, mouseX-40,mouseY+20,mouseX+40,mouseY+20); //pupils fill(116,68,8,200); ellipse(mouseX-9,mouseY-15,4,4); ellipse(mouseX+9,mouseY-15,4,4); //mouth arc(mouseX,mouseY-2,20,10,0,PI); //PI stands for pie,the value (3.14etc.) //falling green circle number 1 stroke(255,255,255,150); fill(70,157,46,100); ellipse (circleI,circleJ,24,24); //cirlce 1 loops continuously if (circleJ>300) {circleJ=0;} //rate of movement falling green circle 1 circleJ = circleJ + 1; //blue eye balls noStroke(); fill(32,73,175,200); ellipse(circleI+5,circleJ,5,5); noStroke(); fill(32,73,175,200); ellipse(circleI-5,circleJ,5,5); //falling green circle copy2 stroke(255,255,255,150); fill(70,157,46,100); ellipse (circleK+50,circleL,24,24); circleL = circleL + 1; //blue eye balls copy2 noStroke(); fill(32,73,175,200); ellipse(circleK+47,circleL,5,5); ```

```noStroke(); fill(32,73,175,200); ellipse(circleK+55,circleL,5,5); } ```