Shape Form

Description:

Write a program that determines the name of a shape from its number of sides. Read the number of sides from the user and then report the appropriate name as part of a meaningful message. Your program should support shapes with anywhere from 7 up to (and including) 10 sides. If a number of sides outside of this range is entered then your program should display an appropriate error message. 1. If the input is 9 then display as Nanogon 2. If the input is 10 display as Decagon 3. If the input is any another number then display the message "Input should be from 7 to 10" Note: Use only if and elif Test Case 1 Input (stdin) 7 Expected Output Heptagon Test Case 2 Input (stdin) 8 Expected Output Octagon

Program :

n=int(input())

if(n==7):

    print("Heptagon")

elif(n==5):

    print("Pentagon")

elif(n==8):

    print("Octagon")

elif(n==9):

print("Nanogon")

elif(n==6):

    print("Hexagon")

else:

    print("Decagon")