Lesson 03.04.txt - #Mishka Allam #06.03.20 #Lesson 03.04...

This preview shows page 1 - 3 out of 3 pages.

#Mishka Allam#06.03.20#Lesson 03.04import turtledef drawTree(t):t.penup()t.setpos(150, -20)t.left(90)t.pendown()t.color("brown")t.pensize(8)t.forward(100)t.pensize(1)t.color("lawn green")t.begin_fill()t.right(90)t.circle(45)t.end_fill()def drawFlower(t, c, x, y):t.penup()t.setpos(x, y)t.left(90)t.pendown()t.color("dark green")t.forward(25)t.color( c )t.begin_fill()t.right(90)t.circle(10)t.end_fill()def drawRectangle(t,c,a,b,d,e,x,y):t.penup()t.setpos(x, y)t.pendown()t.color(c)t.begin_fill()t.left(a)t.forward(b)t.left(d)t.forward(e)t.left(a)
t.forward(b)t.left(d)t.forward(e)t.end_fill()def drawTriangle(t, x, y):t.penup()t.setpos(x, y)t.pendown()t.color("gray")t.begin_fill()t.right(30)t.forward(100)t.left(30)t.backward(160)t.end_fill()def drawCircle(t, x, y):t.penup()t.setpos(x, y)t.pendown()t.color("yellow")t.begin_fill()t.right(90)t.circle(50)t.end_fill()def main():dali = turtle.Turtle()dali.speed(300)drawTree(dali)drawFlower(dali, "red", 150, -20)drawFlower(dali, "orange", 165, -20)drawFlower(dali, "gold", 135, -25)drawFlower(dali, "hotpink", 150, -40)rob = turtle.Turtle()
End of preview. Want to read all 3 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Summer
Professor
jane smith
Tags
Harshad number, Mishka Allam

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture