2016-05-08 3 views
0
import turtle 
s1 = turtle.Screen() 
b = turtle.Turtle() 
b.shape("turtle") 
b.color("blue") 
b.speed(9) 
s1.bgpic("grass.gif") 


########## turtles 
t1 = turtle.Turtle() 
t1.shape('circle') 
t1.pu() 
t1.goto(100,200) 

t2 = turtle.Turtle() 
t2.shape('circle') 
t2.pu() 
t2.goto(-100,-200) 

t3 = turtle.Turtle() 
t3.shape('circle') 
t3.pu() 
t3.goto(200,-200) 

t4 = turtle.Turtle() 
t4.shape('circle') 
t4.pu() 
t4.goto(0,200) 

t5 = turtle.Turtle() 
t5.shape('circle') 
t5.pu() 
t5.goto(400,300) 

あなたのカメをダウンロードしたgif画像に変更するために使用されるpython turtleコマンドは何ですか? t1〜t5を円ではなくgif画像に変更する必要があります。私はプログラムにイメージをインポートするには、次のコードを使用しタートルを画像に変換するpythonコマンド

答えて

2

import turtle 

wn = turtle.Screen() 
wn.bgcolor('white') 

your_image = r"C:\Users\your_name\Pictures\your_image.gif" 

wn.addshape(your_image) 

.GIF画像の中に亀を有効にするには、あなたがその形状を追加画像を作ります。

your_turtle.shape(your_image) 
関連する問題