title: What's the Big-O-notation for this algorithm for printing the prime numbers?
body: <p>I am trying to figure out the time complexity of the below problem.</p>
  <pre><code>import math
  def prime(n):
      for i in range(2,n+1):
          for j in range(2, int(math.sqrt(i))+1):
              if i%j == 0:
                  break
          else:
              print(i)
  
  prime(36)
  </code></pre>
  <p>This problem prints the prime numbers until 36.</p>
  <p>My understanding of the above program:
  for every n the inner loop runs for sqrt(n) times so on until n.</p>
  <p>so the Big-o-Notation is O(n sqrt(n)).</p>
  <p>Does my understanding is right? Please correct me if I am wrong...</p>