int lo = 1; int hi = 100; int n; int total; size( 400, 300); background( 255); total = 0; for( n = lo; n <= hi; n = n+1) { total = total + n; } fill(0); strokeWeight(2); text( total, 10, 10); // Grass at bottom. stroke(0,255,0); strokeWeight(1); float x= 10; /* line( x, height, x, height - 30); line( x + 50, height, x + 50, height - 30); */ /* while( x < width) { line( x, height, x, height - 30); x = x + 20; } fill(255, 0, 0); x = 10; ellipse( x, 300-30, 10, 10); */ for( x = 10; x < width; x += 20) { line( x, height, x, height - 30); fill(255, 0, 0); ellipse( x, 300-30, 10, 10); } strokeWeight(0); fill( 200, 0, 200); ellipse( 150, 100, 80, 80); rect( 110, 100, 80, 80); stroke(200, 0, 200); strokeWeight(2); for( x=120; x<190; x+=20) { line( x, 180, x, 220); }