death6 发表于 2020-10-23 10:05:49

这个程序怎么会报错 求大神帮我找一下原因

import turtle

turtle.width(10)

turtle.color("blue")
turtle.circle(50)

turtle.penup()

turtle.goto(120.0)
turtle.pendown()

turtle.color("black")
turtle.circle(50)

turtle.penup()
turtle.goto(240.0)

turtle.pendown()

turtle.color("red")
turtle.cirele(50)

turtle.penup()

turtle.goto(60.-50)
turtle.pendown()
turtle.color("yellow")
turtle.cirele(50)

turtle.penup()

turtle.goto(180.-50)

turtle.pendown()

turtle.color("green")
turtle.circle(50)

suchocolate 发表于 2020-10-23 10:11:57

turtle.goto(120,0)# 逗号
turtle.circle(50)   # 是circle,不是cirele

冬雪雪冬 发表于 2020-10-23 10:12:25

goto的参数要x和y两个值,你写成小数点了。此外circle也拼写错了。
import turtle

turtle.width(10)

turtle.color("blue")
turtle.circle(50)

turtle.penup()

turtle.goto(120,0)
turtle.pendown()

turtle.color("black")
turtle.circle(50)

turtle.penup()
turtle.goto(240,0)

turtle.pendown()

turtle.color("red")
turtle.circle(50)

turtle.penup()

turtle.goto(60,-50)
turtle.pendown()
turtle.color("yellow")
turtle.circle(50)

turtle.penup()

turtle.goto(180.,-50)

turtle.pendown()

turtle.color("green")
turtle.circle(50)

death6 发表于 2020-10-23 10:12:45

turtle.goto(120.0)一直在这个地方报错

death6 发表于 2020-10-23 10:13:33

suchocolate 发表于 2020-10-23 10:11
turtle.goto(120,0)# 逗号
turtle.circle(50)   # 是circle,不是cirele

好吧 谢谢
页: [1]
查看完整版本: 这个程序怎么会报错 求大神帮我找一下原因