Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

?) cs2321 project 5.pcf × m file// 32 t%20Project%205 pdf CS2321 PROJECT 5 TURTL

ID: 3739840 • Letter: #

Question

?) cs2321 project 5.pcf × m file// 32 t%20Project%205 pdf CS2321 PROJECT 5 TURTLE GRAPHICS Your task for this project will be to create a program which will draw a picture using Turtle graphic. This project will be worth 40 points. Please use proper formatting, comments and naming conventions. Tho due date for this is March 29 at 9:00PM. The picture noeds to have oach of the following elements. 5 points each .A house that fits on the screen. . A poaked roof that is a different color than the houso. . A chimney. Afront door that is a different color than the house .A French window with clear glass. ·You also need a sun in the sky. (Sunrays are optional) Something to represent a yard. (l.E. green grass) . An additional element of your choice. ?

Explanation / Answer

-- in the below code I imported turtle graphics and functions like

fd- forward, bk- back, rt- right, lt- left,

turtle.begin_fill()- to start filling, turtle.color("") -- to fill color , turtle.end_fill()- tp stop filling

turtle.pu()- for lifting pen , turtle.pd()-- for penning down

-----------------------------------------------------------------------------------------------------------------------------------

CODE BEGINS HERE:

-------------------------------------------------------------------------------------------------------------------------------------

#importing turtle library

import turtle

turtle.shape("turtle")

#suare creation
#color begins
turtle.begin_fill()
turtle.color("red")
#moves length 90 and height 150 to form square
turtle.fd(150)
turtle.left(90)
turtle.forward(150)
turtle.left(90)
turtle.forward(150)
turtle.left(90)
turtle.forward(150)
turtle.left(90)
turtle.end_fill()
#color ends


#triangle roof creation
turtle.left(90)
turtle.forward(150)
#roof color starts
turtle.begin_fill()
turtle.color("black")
turtle.left(90)
turtle.forward(10)
turtle.right(120)
turtle.forward(170)
turtle.right(120)
turtle.forward(170)
turtle.right(120)
turtle.forward(10)
turtle.end_fill()
#roof color ends


#aligning towards the bottom part of door
turtle.left(90)
turtle.forward(150)
turtle.right(90)
#door color starts
turtle.begin_fill()
turtle.color("blue")
turtle.forward(80)
turtle.right(90)
turtle.forward(100)
turtle.right(90)
turtle.forward(50)
turtle.right(90)
turtle.forward(100)
turtle.end_fill()
#door color ends


turtle.rt(90)
turtle.fd(100)
turtle.rt(90)
# pen up function holds pen
turtle.pu()
turtle.fd(100)
turtle.pd()# pen down function holds pen down and writes
turtle.rt(90)
# window color starts
turtle.begin_fill()
turtle.color("yellow")
turtle.pencolor("black")
turtle.fd(30)
turtle.rt(90)
turtle.fd(30)
turtle.rt(90)
turtle.fd(30)
turtle.rt(90)
turtle.fd(30)
turtle.rt(90)
turtle.end_fill()
#window color ends

turtle.fd(15)
turtle.rt(90)
turtle.fd(30)
turtle.lt(90)
turtle.fd(15)
turtle.lt(90)
turtle.fd(15)
turtle.lt(90)
turtle.fd(30)

turtle.pu()
turtle.fd(20)
turtle.rt(90)
turtle.pd()
turtle.fd(90)
#chimney color filling begins here
turtle.begin_fill()
turtle.color("brown")
turtle.pencolor("black") # pen color has been set to black
turtle.fd(120)
turtle.rt(90)
turtle.fd(20)
turtle.rt(90)
turtle.fd(95)
turtle.rt(30)
turtle.fd(40)
turtle.end_fill()

turtle.pu()
turtle.fd(40)


turtle.exitonclick()

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote