Created
March 3, 2021 11:25
-
-
Save jayluxferro/04aff34dee1ec1065b261d977e729434 to your computer and use it in GitHub Desktop.
Cluster size for wireless networks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
list = [] | |
def n(i, j): | |
return (i ** 2) + (j ** 2) - (i * j) | |
for x in range(1, 11): | |
for y in range(x + 1): | |
_n = n(x, y) | |
try: | |
list.index(_n) | |
except: | |
list.append(_n) | |
list.sort() | |
print(list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment