from math import sqrt def is_square(n): return sqrt(n).is_integer() print is_square(2**60+1) # Not actually square
Standard input is empty
True
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!