Skip to content

Instantly share code, notes, and snippets.

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