def sector(raio,angulo): cTurtle.fd(raio) cTurtle.left(90) cTurtle.circle(raio, angulo) cTurtle.left(90) cTurtle.fd(raio) cTurtle.left(180-angulo)
def desenha_enforcado(i): cTurtle.up() if(i==0): cTurtle.goto(60,-90) cTurtle.setheading(180) cTurtle.down() cTurtle.forward(130) cTurtle.right(90) cTurtle.forward(160) cTurtle.right(90) cTurtle.forward(70) cTurtle.right(90) cTurtle.forward(20) cTurtle.up() cTurtle.goto(-70,50) cTurtle.down() cTurtle.goto(-50,70) elif(i==1): cTurtle.goto(-20,30) cTurtle.down() cTurtle.circle(20) elif(i==2): cTurtle.goto(0,10) cTurtle.down() cTurtle.goto(0,-30) elif(i==3): cTurtle.goto(0,0) cTurtle.down() cTurtle.goto(-20,-10) elif(i==4): cTurtle.goto(0,0) cTurtle.down() cTurtle.goto(20,-10) elif(i==5): cTurtle.goto(0,-30) cTurtle.down() cTurtle.goto(-20,-70) cTurtle.goto(-30,-70) elif(i==6): cTurtle.goto(0,-30) cTurtle.down() cTurtle.goto(20,-70) cTurtle.goto(30,-70) cTurtle.hideturtle()