Question: Que estion 11A (10 points) A square wave is a wave that transtions between Write the function squarewave that draws a square wave using line
Que estion 11A (10 points) A square wave is a wave that transtions between Write the function squarewave that draws a square wave using line sements of equi emg The function squarewave takes two parameters 1. t, a turtle that is used to draw the square wave. The turtle t may be in any position. up/down state. 2. Length, a positive integer that is the length of one line segment The function squarewave should: 1. draw a straight line, a fall, a straight line, a rise, and a straight line, in acute angle between 2. leave t positioned at the end of the last straight line when it 3. leave t in its initia line when it returns l orientation when it returns (Hint: this posit ion and orientation leave the turtle ready to draw another square wave.) For example, the following would be correct graphical output import turtle snappy turtle.Turtle) squarewave (snappy, 58) Question 11B (10 points) Write a function named motif that calls squarekave to draw a specified number of square waves. he function motif takes four parameters: a turtle, t an integer Length, that is the length of one line segment an integer num, the number of square waves to draw an integer angle, the clockwise rotation between successive square waves example, the following would be correct output. t turtle y turtle. Turtle() (snappy, 50, 4, 98)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
