Wednesday, August 5, 2020

This Middle School Mathematics Program lets you find the type of Polygon when you enter the Exterior Angle of a Polygon-[FREE CODE]

*****
This Middle School Mathematics Program lets you find the type of Polygon when you enter the Exterior Angle of a Polygon
*****



a = int(input("Enter Exterior Angle of the Polygon : "))

if a == 180:

    print("Polygon can not be formed")

elif a == 360:

    print("Polygon can not be formed")

elif 360 % a == 0:

    b = 360 / a

    if b == 3:

        print("There are", round(b), "sides in the polygon and its known as a Triangle")

    elif b == 4:

        print("There are", round(b), "sides in the polygon and its known as a Quadrilateral")

    elif b == 5:

        print("There are", round(b), "sides in the polygon and its known as a Pentagon")

    elif b == 6:

        print("There are", round(b), "sides in the polygon and its known as a Hexagon")

    elif b == 7:

        print("There are", round(b), "sides in the polygon and its known as a Heptagon")

    elif b == 8:

        print("There are", round(b), "sides in the polygon and its known as an Octagon")

    elif b == 9:

        print("There are", round(b), "sides in the polygon and its known as a Nonagon")

    elif b == 10:

        print("There are", round(b), "sides in the polygon and its known as a Decagon")

    else:

        print("There are", round(b), "sides in the polygon")

else:

    print("Polygon cant be formed")