Skip to content

Instantly share code, notes, and snippets.

@dimnikolos
Created March 8, 2018 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimnikolos/3bbf24f6dfc3b05421c52c574ced5e6b to your computer and use it in GitHub Desktop.
Save dimnikolos/3bbf24f6dfc3b05421c52c574ced5e6b to your computer and use it in GitHub Desktop.
import math
def einaiTetragwnos(x):
if math.sqrt(x) == int(math.sqrt(x)):
return(True)
else:
return(False)
for a in range(-3,3):
for b in range(-3,3):
for g in range(-3,3):
ar = g**2-a*b*g
if ar > 0 and einaiTetragwnos(ar):
if (a!=0 and b!=0 and g!=0):
print("α=",a,",β=",b,"γ=",g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment