title: Python - Check if a number is a square
body: <p>I wrote a function that returns whether a number input is a square or not</p>
  
  <pre><code>def is_square(n):
      if n&lt;1:
          return False
      else:
          for i in range(int(n/2)+1):
              if (i*i)==n:
                  return True
              else:
                  return False
  </code></pre>
  
  <p>I am confident that this code works. But when I did the test cases, example:<code>test.expect(    is_square( 4))</code>, it says that the value is not what was expected.</p>