python运行的时候遇到了问题
import turtle
import time
import random
playground=turtle.Screen()
playground.register_shape(file='E:/python/tom.gif')
playground.register_shape(file='E:/python/jerry.gif')
writer=turtle.Turtle()
writer.color('brown')
writer.hideturtle()
writer.penup()
writer.goto(0,0)
writer.write("TOM&JERRY",align='center',font=("Comic Sans Ms",50,'bold'))
writer.goto(0,-50)
writer.write("READY?3,2,1,GO!",align='center',font=("Comic Sans Ms",20,'bold'))
time.sleep(3)
writer.clear()
tom=turtle.Turtle()
tom.shape(file='E:/python/tom.gif')
tom.penup()
tom.goto(random.randint(-200,200),random.randint(-200,200))
jerry=turtle.Turtle()
jerry.shape(file='E:/python/jerry.gif')
jerry.penup()
jerry.goto(random.randint(-200,200),random.randint(-200,200))
==
Traceback (most recent call last):
File "E:\python\TOM_JERRY.py", line 6, in
playground.register_shape(file='E:/python/tom.gif')
TypeError: TurtleScreen.register_shape() got an unexpected keyword argument 'file'
之前报错是_tkinter.TclError: couldn't open "tom.gif": no such file or directory,添加了具体路径后还是不对