Class question

Working from a text book the question reads “Implement a class Polygon that abstracts regular polygons and supports class methods:
- __init__(): A constructor that takes as input the number of sides and the side length of a regular n~gon (n-sided polygon) object
- perimeter(): Returns the perimeter of n-gon object
- area(): Returns the area of the n-gon object
To me this is a mouthful but I did my best with what little experience I have and what I have read from the text book I have and the below text is what I have so far.

Thanks for you help

Thanks for you help with this. I have to ask if all of that code is neccesary? I only ask because when I met with my study group we had a guest and he coded this in less than 20 lines. I am still very new to programming so I am happy to get multiple perspectives.

Also.....

When I type in the following commands i get an error.
>>>p2 = Polygon(6, 1)
p2.perimeter()

Thanks

Since I am new to this I tend not to ask the questions incorrectly. The code I originally posted was way off base.

With that said, how would you code the following?

Implement a class Polygon that abstracts regular polygons and supports class methods:
- __init__(): A constructor that takes as input the number of sides and the side length of a regular n~gon (n-sided polygon) object
- perimeter(): Returns the perimeter of n-gon object
- area(): Returns the area of the n-gon object