Question: Goals: Developing problem-solving skills, checking validity of input, and using multi-branched decision structures. Do not use lists (arrays), tuples or dictionaries. Problem: You are going
Goals: Developing problem-solving skills, checking validity of input, and using multi-branched decision structures. Do not use lists (arrays), tuples or dictionaries.
Problem: You are going to develop a program that will allow the user to draw polygons with different number of sides using different pen colors, and with different lengths of the sides. Your program should prompt the user to enter the number of sides which should be a whole number from 3 to 12 inclusive. Robustly check that the user entered a value in that range (you do not have to check that the user entered a whole number because you should have stored the input as a whole number). Next provide the user a menu of at least 10 colors (e.g. 1 for blue, 2 for yellow etc.). Robustly check that the selected a correct choice. Next ask the user if he/she wants a small, medium or large polygon and robustly confirm that he/she enters a correct choice. Then draw a polygon with the selected size (for small use a side length of 20, for medium use length of 50, and for large use a length of 90), color, and number of sides. Use a pen size of 6 for the drawing. Finally ask the user if he/she would like to create a new polygon. If so, clear the turtle window, and ask the user to enter the choices again. The user should be able to draw as many polygons as he/she would like.
*Do not use any concepts beyond Chapter 4 of Python Fourth Edition by Tony Gaddis (i.e. no functions).
*Do not use any breaks please, as breaks are not aloud to be used in my course
***Can someone please show me how this code can work without the break statements? Also without the use of 'def' functions.
It's due tonight!
Thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
