sinaop 发表于 2020-12-30 10:45:44

代码运行成功画图成功后,画出的图像显示未响应

本帖最后由 sinaop 于 2020-12-30 11:12 编辑

运行玩代码,点击图像显示未响应,点关闭显示python未响应,哪位大神指点下问题所在?
代码如下:
import turtle

def main():
    turtle.pensize(3)
    turtle.penup()
    turtle.goto(-200,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("red")
    turtle.circle(40, steps=3)
    turtle.end_fill()


    turtle.penup()
    turtle.goto(-100,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("blue")
    turtle.circle(40, steps=4)
    turtle.end_fill()

    turtle.penup()
    turtle.goto(0,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("green")
    turtle.circle(40, steps=5)
    turtle.end_fill()

    turtle.penup()
    turtle.goto(100,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("yellow")
    turtle.circle(40, steps=6)
    turtle.end_fill()

    turtle.penup()
    turtle.goto(200,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("purple")
    turtle.circle(40)
    turtle.end_fill()

    turtle.color("green")
    turtle.penup()
    turtle.goto(-100,50)
    turtle.pendown()
    turtle.write(("Cool Colorful shapes"),
      font = ("Times", 18, "bold"))
    turtle.hideturtle()

    turtle.done

if __name__ == '__main__':
    main()

input()

suchocolate 发表于 2020-12-30 10:58:37

求助贴发帖标准:
1)标题:意简言赅,但又能让人对问题一目了然,禁止 “提问,求助,请教” 等三无标题
2)内容:a.程序思路+问题所在
            b.问题描述尽可能详尽,最好加发截图和代码
            c.代码一定要用代码格式发布!

逃兵 发表于 2020-12-30 13:16:32

done加个括号
import turtle

def main():
    turtle.pensize(3)
    turtle.penup()
    turtle.goto(-200,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("red")
    turtle.circle(40, steps=3)
    turtle.end_fill()


    turtle.penup()
    turtle.goto(-100,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("blue")
    turtle.circle(40, steps=4)
    turtle.end_fill()

    turtle.penup()
    turtle.goto(0,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("green")
    turtle.circle(40, steps=5)
    turtle.end_fill()

    turtle.penup()
    turtle.goto(100,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("yellow")
    turtle.circle(40, steps=6)
    turtle.end_fill()

    turtle.penup()
    turtle.goto(200,-50)
    turtle.pendown()
    turtle.begin_fill()
    turtle.color("purple")
    turtle.circle(40)
    turtle.end_fill()

    turtle.color("green")
    turtle.penup()
    turtle.goto(-100,50)
    turtle.pendown()
    turtle.write(("Cool Colorful shapes"),
      font = ("Times", 18, "bold"))
    turtle.hideturtle()

    turtle.done()

if __name__ == '__main__':
    main()

sinaop 发表于 2020-12-31 10:29:58

逃兵 发表于 2020-12-30 13:16
done加个括号

厉害啊。。。。{:5_111:}
页: [1]
查看完整版本: 代码运行成功画图成功后,画出的图像显示未响应