Skip to content

Instantly share code, notes, and snippets.

@prav-raghu
Created January 26, 2022 18:28
Show Gist options
  • Save prav-raghu/e94ce3c8b2db4d0893287443bfef4964 to your computer and use it in GitHub Desktop.
Save prav-raghu/e94ce3c8b2db4d0893287443bfef4964 to your computer and use it in GitHub Desktop.
def square(n):
squares = sum(k*k for k in range(1, n) if k % 2 != 0 and k > 0)
return squares
print(square(5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment