Little Monster

Source: Original code belongs to Gloria!

'''
def setup():
size(600, 800);
background(255);
def draw():
#these are the legs
sizes= [35,400]
leg_sizeY=400
stroke(0,128,0)
fill(0,128,0)
rect(200,450, sizes[0], sizes[1])
stroke(0,128,0)
fill(0,128,0)
rect(385, 450,sizes[0], sizes[1])
#legs color variables defined
legscolorchange = color(75, 115, 160)
legscolorunchange = color(0, 128, 0)
if mouseX < 300:
stroke(75, 115, 160)
fill(legscolorchange)
rect(200,450, sizes[0], sizes[1])
else:
stroke(0, 128, 0)
fill(legscolorunchange)
rect(200,450, sizes[0], sizes[1])
if mouseX < 300:
stroke(75, 115, 160)
fill(legscolorchange)
rect(385,450, sizes[0], sizes[1])
else:
stroke(0, 128, 0)
fill(legscolorunchange)
rect(385,450, sizes[0], sizes[1])
#these are the arms
stroke(0,128,0)
fill(0,128,0)
rect(100,300, sizes[0], sizes[1])
stroke(0,128,0)
fill(0,128,0)
rect(465, 300,sizes[0], sizes[1])
#arms color variables defined
armscolorchange = color(75, 115, 160)
armscolorunchange = color(0, 128, 0)
if mouseX < 300:
stroke(75, 115, 160)
fill(legscolorchange)
rect(100,300, sizes[0], sizes[1])
else:
stroke(0, 128, 0)
fill(legscolorunchange)
rect(100,300, sizes[0], sizes[1])
if mouseX < 300:
stroke(75, 115, 160)
fill(legscolorchange)
rect(465,300, sizes[0], sizes[1])
else:
stroke(0, 128, 0)
fill(legscolorunchange)
rect(465,300, sizes[0], sizes[1])
#these are the ears
triangle(140, 140, 140, 190, 190, 140)
triangle(460, 140, 460, 190, 190, 140)
#this is the face
face_fat=400
stroke(50,205,50)
fill(50,205,50)
ellipse(width/2, 300, face_fat, face_fat)
#face color variables defined
facecolorchange = color(244, 68, 68)
facecolorunchange = color(50, 205, 50)
if mouseX < 300:
stroke(244, 68, 68)
fill(facecolorchange)
ellipse(width/2, 300, face_fat, face_fat)
else:
stroke(50, 205, 50)
fill(facecolorunchange)
ellipse(width/2, 300, face_fat, face_fat)
#this is the eye
eyes_size=170
stroke(255)
fill(255)
ellipse(width/2, 250, eyes_size, eyes_size)
iris_size=70
stroke(0,128,0)
fill(0,128,0)
ellipse(width/2, 250, iris_size, iris_size)
#eye color variables defined
eyecolorchange = color(75, 115, 160)
eyecolorunchange = color(0, 128, 0)
if mouseX < 300:
fill(eyecolorchange)
ellipse(width/2, 250, iris_size, iris_size)
else:
fill(eyecolorunchange)
ellipse(width/2, 250, iris_size, iris_size)
pupil_size=30
stroke(0)
fill(0)
ellipse(width/2, 250, pupil_size, pupil_size)
#this is the mouth
stroke(0)
fill(0)
ellipse(width/2, 410, 140, 90)
Like what you read? Give Whigham Rachel Covington a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.