Question: Write code that asks the user for the number of sides to a polygon and then prints out the name of the polygon. Your code

Write code that asks the user for the number of sides to a polygon and then prints out the name of the polygon. Your code should support polygons from 3 to 10 sides. If a number of sides entered is outside this range, then your code should display an appropriate error message. For example:
How many sides does your polygon have (enter an integer from 3 to 10)?7
Heptagon
How many sides does your polygon have (enter an integer from 3 to 10)?13
You don't know how to follow directions, do you!?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!