Skip to content

Instantly share code, notes, and snippets.

@KimihiroTanaka
Created June 21, 2017 09:51
Show Gist options
  • Save KimihiroTanaka/f894230cd7e595b06f19284a2ad25956 to your computer and use it in GitHub Desktop.
Save KimihiroTanaka/f894230cd7e595b06f19284a2ad25956 to your computer and use it in GitHub Desktop.
null created by KimihiroTanaka - https://repl.it/IvSK/0
import math
def polysum(n, s):
return round((n * s) ** 2 + (0.25 * n * s * s) / (math.tan(math.pi / n)), 4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment