Question: Problem 3 Create a new python file with the usual comment header and write code that uses the turtle module to draw an equilateral triangle
Problem 3 Create a new python file with the usual comment header and write code that uses the turtle module to draw an equilateral triangle by making either right or left turns. Your code should ask the user for direction which will be 'R' for Right or 'L' for Left and the side_length. Use a variable for the angle of the turns. You may not use turtle.home to solve this problem. Below is a sample code execution. Your code should display its output exactly as shown below. Test your code for both the 'R' and 'L' case. What happens if you enter 'Q' as input? Please enter a direction (R or L) : R Please enter a side length: 100 Figure 1: Equilateral Triangle Drawn by Making Right Turns
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
