Question: In this assignment, you will extend the existing turtle graphics program from class ( Week 6 - Example 3 ) that draws a house by
In this assignment, you will extend the existing turtle graphics program from class Week Example that draws a house by adding a garden scene. Each element sun trees, pathway, flowers must be implemented in a separate function. The original functions except for initialization cannot be modified, and each function must include preconditions and postconditions.
New Drawing Elements
Sun: Draw a yellow circle in the sky with rays extending outwards.
Function: drawsun
Trees: Draw two trees next to the house. Each tree should consist of a rectangle for the trunk and a circle or triangle for the foliage.
Function: drawtreex y
Pathway: Add a pathway leading from the door using rectangles.
Function: drawpathway
Flowers: Draw small flowers along the pathway circles for petals and a line for the stem Use fillcolor to use color.
Function: drawflowerx y color
Explanation:
x defines how far left or right the turtle will move to start drawing the object.
y defines how far up or down the turtle will move to start drawing the object.
These coordinates allow you to place multiple trees or flowers in different locations by specifying the appropriate x and y values when calling the function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
