Skip to content

Instantly share code, notes, and snippets.

@marquesds
Created March 20, 2018 01:46
Show Gist options
  • Save marquesds/4fbef8ddc2570be7f8ea1691f4401ad9 to your computer and use it in GitHub Desktop.
Save marquesds/4fbef8ddc2570be7f8ea1691f4401ad9 to your computer and use it in GitHub Desktop.
def shapeArea(n):
result = 0
while n > 1:
result += 4 * (n - 1)
n -= 1
return result + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment