Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import turtle
# 絵画領域とタートルの作成
turtle.setup(width=300, height=300) # 絵画領域の作成
my_turtle = turtle.Turtle() # タートル
# タートルを移動
my_turtle.forward(100) # 100前進
my_turtle.setpos(0, -100) # (0, -100)に移動
my_turtle.penup() # 筆を上げる
my_turtle.forward(50) # 100前進
my_turtle.pendown() # 筆を下ろす
my_turtle.forward(-50) # 100前進
# タートルを回転
my_turtle.setheading(90) # 上を向く
my_turtle.forward(100) # 100前進
# 点を描く
my_turtle.dot(10, "red") # 赤丸を描く
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.