Advertisement
Icomey

Untitled

Feb 27th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. from math import tan
  2. import math
  3. math.pi
  4. def polysum (n, s):
  5. area = (0.25*n*(s**2))/ (tan(math.pi/n))
  6. perimeter= n * s
  7. sum = area + (perimeter**2)
  8. sum = round(sum, 4)
  9. return sum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement