title: trying to build a complex calculator in python
body: <pre><code>def calc():
      import math
  
      num=float(raw_input("Enter a number"))
      func=raw_input("Enter a function")
      result=math.func(num)
      return result
  
  a=calc()
  print a
  </code></pre>
  
  <p>I'm getting a number (num) and a name of a math function(func),(like: log,sqrt,sin,cos and such..)
  I need to return the result of using this function on the number.</p>
  
  <p>This is the Error i'm getting:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/user/Desktop/try of 3", line 11, in &lt;module&gt;
      a=calc()
    File "C:/Users/user/Desktop/try of 3", line 8, in calc
      result=math.func(num)
  AttributeError: 'module' object has no attribute 'func'
  </code></pre>
  
  <p>please help! how do I fix it?</p>