Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # t_xmas_tree.py
- from turtle import *
- do = Turtle()
- do.speed(10)
- do.shape("triangle")
- bgcolor("black")
- do.hideturtle()
- do.penup()
- do.goto(0,140)
- do.pendown()
- do.color("yellow")
- do.write("*", False, "center", font=("Wide Latin", 90))
- do.color("Lime Green")
- do.pensize(5)
- do.penup()
- do.goto(0,200)
- do.pendown()
- x = 10
- y = 200
- h = 8
- for c in range(h):
- x = x + 20
- y = y - 40
- do.goto(-x, y-30)
- do.goto(0, y+20)
- do.goto(x,y-30)
- if c < h-1:
- do.goto(0, y)
- do.penup()
- x = 15
- y = y - 5
- do.goto(x,y)
- do.color("burlywood4")
- do.pendown()
- do.pensize(5)
- for c in range(h*2):
- do.goto(-x, y)
- do.goto(x,y)
- y = y - 3
- do.penup()
- do.goto(0,-250)
- do.color("red")
- do.write("Merry Christmas !!!", False, "center", font=("Showcard Gothic", 40))
- done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement