generated from mwc/lab_names
Initial commit
This commit is contained in:
32
draw_with_shapes.py
Normal file
32
draw_with_shapes.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user