generated from mwc/problemset_typeface
Easy
This commit is contained in:
50
typeface.py
50
typeface.py
@@ -13,11 +13,50 @@ from turtle import *
|
||||
from math import sqrt
|
||||
|
||||
def draw_letter_a(unit):
|
||||
pass
|
||||
fly(unit * 2)
|
||||
pendown()
|
||||
left(90)
|
||||
forward(unit * 6)
|
||||
right(45)
|
||||
forward(unit * sqrt(2)*2)
|
||||
right(90)
|
||||
forward(unit * sqrt(2)*2)
|
||||
right(45)
|
||||
forward(unit * 2)
|
||||
right(90)
|
||||
fly(unit * 4)
|
||||
right(180)
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
|
||||
def draw_letter_b(unit):
|
||||
pass
|
||||
|
||||
fly(unit * 2)
|
||||
left(90)
|
||||
fly(unit * 8)
|
||||
left(180)
|
||||
forward(unit * 8)
|
||||
left(90)
|
||||
forward(unit * 2)
|
||||
left(45)
|
||||
forward(unit * sqrt(2))
|
||||
left(45)
|
||||
forward(unit * 2)
|
||||
left(45)
|
||||
forward (unit * sqrt(2))
|
||||
left(45)
|
||||
forward (unit * 2)
|
||||
right(180)
|
||||
forward(unit * 2)
|
||||
left(45)
|
||||
forward(unit * sqrt(2))
|
||||
left(45)
|
||||
forward(unit * 2)
|
||||
left(45)
|
||||
forward (unit * sqrt(2))
|
||||
left(45)
|
||||
forward (unit * 2)
|
||||
|
||||
def draw_letter_c(unit):
|
||||
pass
|
||||
|
||||
@@ -89,3 +128,8 @@ def draw_letter_y(unit):
|
||||
|
||||
def draw_letter_z(unit):
|
||||
pass
|
||||
|
||||
def fly(distance):
|
||||
penup()
|
||||
forward(distance)
|
||||
pendown()
|
||||
|
||||
Reference in New Issue
Block a user