m0_61245586
2021-08-26 23:22
采纳率: 100%
浏览 36
已结题

求助,turtle画蛇报错

img

import turtle
def drawsnake(rad,angle,len,neckrad):
for i in range(len):
turtle.circle(rad,angle)
turtle.circle(-rad,angle)
turtle.circle(rad,angle/2)
turtle.fd(rad)
turtle.circle(neckrad+1,180)
turtle.fd(rad*2/3)
def main():
turtle.setup(1300,800,0,0)
pythonsize = 30
turtle.pensize(pythonsize)
turtle.pencolor('bule')
turtle.seth(-40)
drawsnake(40,80,5,pythonsize/2)
main()

  • 收藏

1条回答 默认 最新

  • Python Newbie 2021-08-27 16:31
    已采纳

    第11行,setup改成goto

    打赏 评论

相关推荐 更多相似问题