Question: Hi - this code is for Python Turtle. This is a beginner class so the code should be fairly basic. I would appreciate any help
Hi - this code is for Python Turtle. This is a beginner class so the code should be fairly basic. I would appreciate any help you can provide.
Write a program that asks the user for the number of sides (Enter number of sides:), the length of the sides (same for all sides .. Enter length of sides:), the outline color (Enter color:), and the fill color (Enter fill color:) of a regular polygon.
The program should draw the polygon and then fill it in. You will need to use the turtle module for this exercise and the color(), fillcolor(), begin_fill(), forward(), left(), and end_fill() functions. The code below can be removed or changed as needed.
import turtle
t = turtle.Turtle()
t.forward(75)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
