Question
Write a function named Ls that uses turtle graphics and the function capitalL to draw a sequence of letter L's of specified size, position and
Write a function named Ls that uses turtle graphics and the function capitalL to draw a sequence of letter L's of specified size, position and orientation. Begin drawing each letter L at the same point, which is the initial location of the turtle. Increase the size of each letter L after the first L by a specified factor. Rotate each letter L after the first one clockwise by a specified angle.
The function Ls should repeatedly call capitalL to draw the letter L's.
The function Ls takes 5 parameters:
1. t, a turtle used for drawing
2. initWidth, the length of the short side of the first L
3. multiplier, the factor by which the size of successive L's is increased
4. reps, an integer that is the number of L's to draw
5. angle, the number of degrees to rotate successive rectangles
If Ls is called by the following code, this would be correct output.
import turtle
s = turtle.Screen()
aPen = turtle.Turtle()
aPen.left(60)
Ls(aPen, 20, 1.5, 3, 20)
Answer in Python
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started