Working on program #2 this is what I have so far but it keeps saying my turtle is undefined. Can anybody help?

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 14E
icon
Related questions
Question
Working on program #2 this is what I have so far but it keeps saying my turtle is undefined. Can anybody help?
Reader turtle-turtle.Turtle (O
size of pen=turtle.pensize (size0fPen)
color turtle.color(colorOfSide)
#prompts
eBay
import turtle
number of sides=int (input ("How many sides?"))
Pen size=int (input ("What size should the pen be?"))
Side size-int (input ("What size should each side be?"))
Side color=input ("What color should the side be?")
#polygon
FreeRid polygon-turtle.Turtle ()
Games
Pen size=(size of pen)
turtle.color (color of side)
for x in range (0,number of sides):
polygon.forward (length)
polygon.right (360/side)
Get
CleanPri
turtle.done ()
Google
Chrom
Google D
Transcribed Image Text:Reader turtle-turtle.Turtle (O size of pen=turtle.pensize (size0fPen) color turtle.color(colorOfSide) #prompts eBay import turtle number of sides=int (input ("How many sides?")) Pen size=int (input ("What size should the pen be?")) Side size-int (input ("What size should each side be?")) Side color=input ("What color should the side be?") #polygon FreeRid polygon-turtle.Turtle () Games Pen size=(size of pen) turtle.color (color of side) for x in range (0,number of sides): polygon.forward (length) polygon.right (360/side) Get CleanPri turtle.done () Google Chrom Google D
1:09
• Write two Python programs that use Turtle graphics:
• Program #1: Draw a square, triangle, and octagon on the screen. They
should not touch each other or overlap. They should each be a
different color. The octagon should be drawn using a while loop.
• Program #2: Ask the user to type in the following inputs:
•Number of sides
•Length of each side
.Color of the sides
- The pen size
Your program should then draw a regular polygon with those
properties.
Transcribed Image Text:1:09 • Write two Python programs that use Turtle graphics: • Program #1: Draw a square, triangle, and octagon on the screen. They should not touch each other or overlap. They should each be a different color. The octagon should be drawn using a while loop. • Program #2: Ask the user to type in the following inputs: •Number of sides •Length of each side .Color of the sides - The pen size Your program should then draw a regular polygon with those properties.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr