python的turtle导入图片报错
##1##
##11
##2##
import turtle as c
import random as r
c.setup(600,600)
c.register_shape('house.gif')
h=c.Turtle()
h.shape('house.gif')
# c.register_shape('无标题.png')
d=c.Turtle()
# c.shape('无标题.png')
x1=r.randint(-300,300)
x2=r.randint(-300,300)
y1=r.randint(-300,300)
y2=r.randint(-300,300)
d.penup()
h.penup()
d.goto(x1,y1)
h.goto(x2,y2)
# 小海龟前进
def ahead():
t.penup()
t.forward(10)
collect()
# 小海龟后退
def back():
t.penup()
t.backward(10)
collect()
# 小海龟左转
def turnLeft():
t.left(30)
# 小海龟右转
def turnRight():
t.right(30)
c.done()