Answer
import turtle
#clock
turtle.pensize(3)
turtle.forward(180)
turtle.right(180)
turtle.forward(180)
turtle.pensize(2)
turtle.right(90)
turtle.forward(200)
turtle.right(180)
turtle.forward(200)
turtle.pensize(4)
turtle.right(195/2)
turtle.forward(140)
turtle.right(180)
turtle.forward(140)
turtle.left(90/12)
turtle.penup()
turtle.forward(240)
turtle.left(90)
turtle.pendown()
turtle.pensize(3)
turtle.circle(240)
#add numbers to clock face
turtle.penup()
turtle.goto(220, -15)
turtle.write(3, align="center", font=("Arial", 20, "normal"))
turtle.goto(0,205)
turtle.write(12, align="center", font=("Arial", 20, "normal"))
turtle.goto(-220, -15)
turtle.write(9, align="center", font=("Arial", 20, "normal"))
turtle.goto(0, -235)
turtle.write(6, align="center", font=("Arial", 20, "normal"))
#display time
turtle.goto(0, -150)
turtle.write("9:15:00", align="center", font=("Arial", 15, "normal"))
turtle.done
Work Step by Step
This exercise ties together everything this chapter has taught us about the turtle module. The code here creates a clock that is somewhat more realistic looking than the one in the book.