It looks like you're new here. If you want to get involved, click one of these buttons!
[chronic@vandal src]$ python main.py
Number of sides: 8
1080
#!/usr/bin/env python
'''
Simple tool written in Python to help find the sum of interior angles of a regular polygon
Formula:
180(n - 2) where n is the number of sides
'''
import sys
class DoMath(object):
def __init__(self, n):
self.sides = n
def GetSum(self):
number = self.sides - 2
answer = 180 * number
print answer
try:
n = int(raw_input(\"Number of sides: \"))
except ValueError:
print(\"Value not correct\")
sys.exit()
initmath = DoMath(n)
initmath.GetSum()