Question: Create a Python program named cst - 1 5 0 - turtle - shapes.py . Write five methods: a . drawCircle - Prompts the user
Create a Python program named cstturtleshapes.py
Write five methods: a drawCircle Prompts the user for the radius and uses Turtle graphics to draw a circle. b drawTriangle Uses Turtle graphics to draw a triangle. c drawSquare Uses Turtle graphics to draw a square. d drawOctagon Uses Turtle graphics to draw an octagon. e main Demonstrates each of the methods above. It prompts the user for the number of sides, draws the corresponding shape, and asks if the user wants to draw another shape. The program should clear the canvas before drawing new shapes.
The program should prompt the user if they would like to add an additional shape. If the user chooses "Yes," the program should prompt the user for the number of sides and draw another shape. If the user selects anything else, the program should stop.
Use the clear function from the Turtle documentation to reset the canvas before drawing new shapes.
Save and run your program to demonstrate drawing shapes with Turtle graphics.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
