lab_names/draw_with_shapes.py

33 lines
455 B
Python

# draw_with_shapes.py
# -------------------
# By MWC contributors
from turtle import *
from shapes import triangle, rectangle
def flyto(x, y):
penup()
goto(x, y)
pendown()
flyto(-100, 0)
triangle(40)
triangle(60)
triangle(80)
triangle(100)
flyto(100, 0)
rectangle(10, 90)
rectangle(20, 80)
rectangle(30, 70)
rectangle(40, 60)
rectangle(50, 50)
rectangle(60, 40)
rectangle(70, 30)
rectangle(80, 20)
rectangle(90, 10)
hideturtle()
input()