title: Difference between import math and from math import
body: <p>What is the difference between <strong>import math</strong> and <strong>from math import</strong> if the two resolve the same problem?</p>
  <pre><code>from math import sqrt 
      
      x=4
      a=4
      b=4
      
      if x==1:
          c=a+b 
      elif x==2:
          c=a*b
      elif x==3:
          c=pow(a,2)
      elif x==4:
          c=sqrt(b)
      else:    
          print('Error')
  </code></pre>
  <p>Or</p>
  <pre><code>import math
  
  x=3
  a=4
  b=4
  
  if x==1:
      c=a+b 
  elif x==2:
      c=a*b
  elif x==3:
      c=pow(a,2)
  elif x==4:
      c= math.sqrt(b)
  else:    
      print('Error')
  </code></pre>
  <p>My teacher told me use the first example, that's <strong>always</strong> the way to do it.</p>
  <p>I see in the second example we are importing the class math I know is a class because I need to call the class first <strong>math.sqrt()</strong>, in the first example is not a necessity to call it, I suppose is not a class or is sort of a static class thing.</p>