# Python application for drawing of a model of XMAS tree - using Turtle
import turtle
from turtle import *
# MANUAL with commands:
# https://docs.python.org/3.3/library/turtle.html
window=turtle.Screen()
window.bgcolor("white")
color('blue', 'green')
begin_fill()
for n in range(3):
forward(200)
left(120)
end_fill()
forward(200)
left(120)
forward(90)
turtle.pendown()
turtle.pencolor('yellow')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
left(70)
forward(50)
turtle.pendown()
turtle.pencolor('blue')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
forward(50)
turtle.pendown()
turtle.pencolor('red')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
right(120)
forward(100)
right(60)
forward(15)
turtle.pendown()
turtle.pencolor('yellow')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
right(105)
forward(45)
turtle.pendown()
turtle.pencolor('violet')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
done()
import turtle
from turtle import *
# MANUAL with commands:
# https://docs.python.org/3.3/library/turtle.html
window=turtle.Screen()
window.bgcolor("white")
color('blue', 'green')
begin_fill()
for n in range(3):
forward(200)
left(120)
end_fill()
forward(200)
left(120)
forward(90)
turtle.pendown()
turtle.pencolor('yellow')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
left(70)
forward(50)
turtle.pendown()
turtle.pencolor('blue')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
forward(50)
turtle.pendown()
turtle.pencolor('red')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
right(120)
forward(100)
right(60)
forward(15)
turtle.pendown()
turtle.pencolor('yellow')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
right(105)
forward(45)
turtle.pendown()
turtle.pencolor('violet')
turtle.pensize(20)
turtle.circle(10)
turtle.penup()
done()
1 comment:
Thanks for sharing this post.
Full Stack Training in Chennai | Certification | Online Training Course | Full Stack Training in Bangalore | Certification | Online Training Course | Full Stack Training in Hyderabad | Certification | Online Training Course | Full Stack Training in Pune | Certification | Online Training Course | Full Stack Training | Certification | Full Stack Online Training Course
Post a Comment