Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment 3: Turtle Shape Maker Instructions Using Python and Turtle we can draw all sorts of shapes. In this assignment, you are going to ask
Assignment 3: Turtle Shape Maker Instructions Using Python and Turtle we can draw all sorts of shapes. In this assignment, you are going to ask for input from the user for how many shapes, lines, and how much to turn. Then draw using Turtle based on their responses. Create a Python script named shape_maker.py The program will need to do the following: 1. First, prompt the user for the number of shapes they wish to draw. You can assume that the user will only enter a value that can be converted to an integer. a. 2. For each shape (based on the number entered in the previous step): a. Display the shape number (1, 2, 3, etc.) to the user. b. Then you will need to ask the user two questions: i. How many lines to draw? 1. This is how many lines will be drawn. ii. How much to turn before each line is drawn? 1. This is how much the cursor needs to turn after drawing each line. Based on these inputs, you will draw using turtle to match the requests. i. You get to decide how far the turtle will travel for each line. ii. It would be recommended that the length be something like 50. c. 3. Have the turtle window not close until the user clicks on the window. 4. a. The application does not always have to draw perfect shapes, it is all based on what the user enters. For example, if the user only chooses to: 1. draw 2 lines and an angle of 90 degrees a. you would only get half of a square. 2. draw 4 lines and turns 45 degrees a. you would only get half of an octogon. Example This is some example interaction with the program. How many shapes should I draw? 2 Python Turtle Graphics For shape 1: How many lines should I draw? 4 What angle should I turn each time? 90 For shape 2: How many lines should I draw? 6 What angle should I turn each time? 60
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started