title: find the first occurrence of a number greater than k in a sorted array
body: <p>For the given sorted list,the program should return the index of the number in the list which is greater than the number which is given as input. </p>
  
  <p>Now when i run code and check if it is working i am getting 2 outputs. One is the value and other output is None.</p>
  
  <p>If say i gave a input of 3 for the below code.The expected output is index of 20 i.e., 1 instead i am getting 1 followed by None.</p>
  
  <p>If i give any value that is greater than the one present in the list i am getting correct output i.e., "The entered number is greater than the numbers in the list"</p>
  
  <pre><code>num_to_find = int(input("Enter the number to be found"))
  
  a=[2,20,30]
  def occur1(a,num_to_find):
      j = i = 0
      while j==0:
          if a[len(a)-1] &gt; num_to_find:
              if num_to_find &lt; a[i]:
                  j=1
                  print(i)
                  break
              else:
                  i = i + 1
          else:
              ret_state = "The entered number is greater than the numbers in the list"
              return ret_state
  
  print(occur1(a,num_to_find))
  </code></pre>