Question: question 8 : Write a function called figure _ row ( x , y , n ) that draws a horizontal line of n stick
question : Write a function called figurerowx y n that draws a horizontal line of n stick figures. Draw the first stick figure at x y and the others to the right of it at equallyspaced intervals. Don't let the figures overlap or go off the screen.
x y should be either the bottomleft or bottomright corner of the row of stick figures.
Note that there is no size parameter passed to figurerow. Draw stick figures of size s a row of stick figures: using the a file def figurerowx y n so far this is what u have fix it so it draws stick figures in a row next to each other using my a file
for i in rangen:
size
radius
ajumptox i y
aeyeradius
turtle.fillcolorwhite
turtle.beginfill
turtle.circleradius
turtle.endfill
turtle.fillcolorblack
turtle.beginfill
turtle.circleradius
turtle.endfill
adrawhappysize
ajumptox y
turtle.pendown
turtle.setheading
turtle.circlesize
turtle.penup
adrawsadsize
turtle.pendown
turtle.setheading
turtle.circlesize
turtle.penup
adrawsurprisedsize
turtle.pendown
turtle.setheading
turtle.circlesize
turtle.penup
adrawneutralsize
turtle.pendown
turtle.gotosize
turtle.forwardsize
turtle.penup
adraweyessize
turtle.penup
turtle.gotosize size
turtle.pendown
aeyesize
turtle.penup
turtle.gotosize size
turtle.pendown
aeyesize
turtle.penup
anosesize
turtle.pensizesize
turtle.penup
turtle.goto size
turtle.pendown
turtle.setheading
turtle.forwardsize
turtle.left
turtle.forwardsize
turtle.penup
return turtle.position
aheadsize
headcolor random.choicered 'blue', 'green', 'yellow', 'purple', 'orange'
turtle.fillcolorheadcolor
# Draw the head circle
turtle.penup
turtle.gotosize
turtle.pendown
turtle.beginfill
turtle.circlesize
turtle.endfill
turtle.penup
# Draw eyes
draweyessize
# Draw nose
nosepos nosesize
# Draw mouth
turtle.gotonosepos nosepos size
turtle.setheading
mouthstyles happy 'sad', 'surprised', 'neutral'
selectedmouth random.choicemouthstyles
if selectedmouth 'happy':
drawhappysize
elif selectedmouth 'sad':
drawsadsize
elif selectedmouth 'surprised':
drawsurprisedsize
else:
drawneutralsize
abodysize
# Draw the body
turtle.penup
turtle.gotosize
turtle.pendown
turtle.gotosize
turtle.penup
aarmsarmsize
# Draw the arms
turtle.gotosize
turtle.pendown
turtle.gotosize, size
turtle.penup
turtle.gotosize
turtle.pendown
turtle.gotosizesize
turtle.penup
alegssize
# Draw the legs
turtle.gotosize
turtle.pendown
turtle.gotosize size
turtle.penup
turtle.gotosize
turtle.pendown
turtle.gotosize size
turtle.penup
astickfiguresize
headsize
bodysize
armssize
legssize
def drawmultiplerowsstartx starty rows, figuresperrow:
verticalspacing
for i in rangerows:
yposition starty i verticalspacing
figurerowstartx yposition, figuresperrow
apyturtle.penup
aturtle.gotox Y
turtle.setheading
turtle.pendown
astickfigureasize
turtle.speed
turtle.hideturtle
turtle.done and do question : Write a function called figuregridx y r c that draws a rectangular array consisting of r rows each containing c stick figures drawn using figurerow Draw each row at regularly spaced intervals, and don't let figures overlap or go off the screen.
Draw the figures at a size that allows for at least rows and figures per row to fit on the screen.
For example, here's a by grid of stick figures:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
