Python – Compass




# Christina Schneider
# Python Turtle (Compass)
# 2-25-25
import turtle
t = turtle
t.pensize(3)
t.hideturtle()
# Make middle clircle
t.penup()
t.goto(0, -20)
t.pendown()
t.circle(20)
# Make up and down line
t.penup()
t.goto(0, 120)
t.pendown()
t.goto(0, -120)
# make left and right line
t.penup()
t.goto(-120, 0)
t.pendown()
t.goto(120, 0)
# write North
t.penup()
t.goto(-13, 130)
t.pendown
t.write("North")
# write South
t.penup()
t.goto(-13, -135)
t.pendown()
t.write("South")
# write East
t.penup()
t.goto(127, -3)
t.pendown()
t.write("East")
# write West
t.penup()
t.goto(-150, -3)
t.pendown()
t.write("West")