diff --git a/typeface.py b/typeface.py index b966bef..56f70a4 100644 --- a/typeface.py +++ b/typeface.py @@ -1,5 +1,5 @@ # typeface.py -# By Chris Proctor and _________ +# By Chris Proctor and _____Grace____ # Contains one function for each letter in the English alphabet. # Each function should draw its letter at a scale of `unit`, and then @@ -13,14 +13,60 @@ from turtle import * from math import sqrt def draw_letter_a(unit): - pass + initial_position = pos() + initial_heading = heading() + left(60) + forward(8 * unit) + + right(120) + forward(8 * unit) + + backward(4 * unit) + right(120) + forward(4 * unit) + + penup() + setpos(initial_position) # Return to original position + setheading(initial_heading) # Return to original heading + pendown() def draw_letter_b(unit): - pass + initial_position = pos() + initial_heading = heading() + speed(0) + circle(2 * unit, 180) + left(180) + circle(2 * unit, 180) + left(90) + forward(8 * unit) + + penup() + setpos(initial_position) # Return to original position + setheading(initial_heading) # Return to original heading + pendown() def draw_letter_c(unit): - pass + initial_position = pos() + initial_heading = heading() + speed(0) + penup() + forward(4 * unit) + left(90) + forward(8 * unit) + pendown() + left(90) + circle(4 * unit, 180) + penup() + right(90) + forward(2 * unit) + pendown() + + penup() + setpos(initial_position) + setheading(initial_heading) + pendown() + def draw_letter_d(unit): pass @@ -37,7 +83,23 @@ def draw_letter_h(unit): pass def draw_letter_i(unit): - pass + initial_position = pos() + initial_heading = heading() + penup() + forward(4 * unit) + left(90) + pendown() + forward(5 * unit) + penup() + forward(1 * unit) + pendown() + forward(1 * unit) + + penup() + setpos(initial_position) + setheading(initial_heading) + pendown() + def draw_letter_j(unit): pass