Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

Why is linear programming useful in CPM crashing?

Answered: 1 week ago