Question: PYTHON. Need a simple python for the following question(s). question 11A (10 points) A square wave is a wave that transitions betweer Write the function

 PYTHON. Need a simple python for the following question(s). question 11A

PYTHON. Need a simple python for the following question(s).

question 11A (10 points) A square wave is a wave that transitions betweer Write the function squarewave that draws a square 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, 2. Length, a positive integer that is the length of one line segment The function squarewave should: wave using 5 line segments of equal length. and up/down state. draw a straight line, a fall, a straight line, a rise, and a straight line, in that order, with a 45 degree acute angle between the straight lines and the slanted lines leave t positioned at the end of the last straight line when it returns 3. 2. leave t in its initial orientation when it returns Hint: this position 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, se) Question 11B (10 points) Write a function named motif that calls squarewave to draw a specified number of square waves. The function motif takes four parameters: . a turtle, t . an integer Length, that is the length of one line segment an integer angle, the clockwise rotation between successive square waves For example, the following would be correct output an integer num, the number of square waves to draw import turtle snappyturtle.Turtle) motif (snappy, 5e, 4, 9e) nctions

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!