Question: Python 3.6 Question 11a (8 points) Write a function named halfSquare that uses turtle graphics to draw half of a square on the screen. This

Python 3.6

Python 3.6 Question 11a (8 points) Write a function named halfSquare that

Question 11a (8 points) Write a function named halfSquare that uses turtle graphics to draw half of a square on the screen. This involves drawing two lines of equal length, making a 90 degree turn after each. For full credit, these repeated operations should be performed in a loop The function halfSquare takes two parameters i. t, a turtle that is used for drawing ii. length, the length of the lines The function halfSquare should begin drawing without changing the position or orientation of the turtle t. The turtle t that is passed to halfSquare may initially be either up or down and may be at any location on the screen and in any orientation The figure at the right shows sample graphical output of halfSquare Question 11b (12 points) Write a function named halfSquares that calls the function halfSquare repeatedly to draw connected half squares of increasing size. (You can use this technique to draw a spiral pattern.) The function halfSquares takes four parameters: i. t, a turtle used for drawing ii. initial, the length of a side of the first half square . increment, the increase in side length of each successive half square iv. reps, the number of half squares to draw For example, the graphical output of the code below should look like the illustration at the right: import turtle s = tu rtle . Screen( ) turt - turtle.Turtle() halfSquares (turt, 20, 20, 10)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!