# typeface.py # By Chris Proctor and _________ # Contains one function for each letter in the English alphabet. # Each function should draw its letter at a scale of `unit`, and then # return back to the same position and heading where it started. # Note: The `sqrt` function from math may be helpful--if you want to # move the turtle along the diagonal of a square with side length x, # the turtle should move a distance of sqrt(x) from turtle import * from math import sqrt unit = 10 def draw_letter_l(): pendown() left(90) forward(unit * 4) penup() right(90) def draw_letter_o(): pendown() for i in range(4): forward(unit * 4) left(90) penup() def draw_letter_z(): pendown() forward(unit * 6) left(135) forward(unit * sqrt(2) * 6) right(135) forward(unit * 6) penup() # spacing draw_letter_l() penup() forward(unit * 8) draw_letter_o() penup() forward(unit * 8) draw_letter_z() done()