generated from mwc/problemset_typeface
I added a 5th letter, F.
I enjoyed doing the problem set yesterday, and since I'd only made one commit, I thought I'd do three more letters to get to the four commits for the problemset. I continue to have a bit of difficulty with taking the perspective of the turtle to know whether one of the arguments for the circle function should be negative. I tested it every time I made a change, primarily when I made a segment and turned, so that I could quickly adjust if necessary. It ended up going pretty quickly!
This commit is contained in:
parent
5d1a98a462
commit
787d8db9cf
33
typeface.py
33
typeface.py
|
@ -65,7 +65,34 @@ def draw_letter_e(unit):
|
|||
pass
|
||||
|
||||
def draw_letter_f(unit):
|
||||
pass
|
||||
#print(heading())
|
||||
#print(pos())
|
||||
circle(unit,90)
|
||||
forward(6 * unit)
|
||||
circle(unit,90)
|
||||
right(180)
|
||||
forward(7 * unit)
|
||||
right(90)
|
||||
forward(2 * unit)
|
||||
circle(-unit,-90)
|
||||
left(180)
|
||||
forward(3 * unit)
|
||||
left(90)
|
||||
forward(2 * unit)
|
||||
left(90)
|
||||
forward(4 * unit)
|
||||
right(90)
|
||||
forward(2 * unit)
|
||||
circle(-unit,-90)
|
||||
left(180)
|
||||
forward(3 * unit)
|
||||
left(90)
|
||||
forward(3 * unit)
|
||||
circle(unit,90)
|
||||
left(180)
|
||||
forward(4 * unit)
|
||||
right(180)
|
||||
|
||||
|
||||
def draw_letter_g(unit):
|
||||
pass
|
||||
|
@ -77,8 +104,8 @@ def draw_letter_i(unit):
|
|||
pass
|
||||
|
||||
def draw_letter_j(unit):
|
||||
print(heading())
|
||||
print(pos())
|
||||
# print(heading())
|
||||
# print(pos())
|
||||
left(90)
|
||||
penup()
|
||||
forward(8 * unit)
|
||||
|
|
Loading…
Reference in New Issue