title: TypeError: a float is required - Python
body: <p>I am currently creating a trigonometric calculator via Python 3.x. In one of my functions, I created a value for an unknown angle of a right triangle 
  'angle_b' which I defined by assigning it the function 'ANGLE_B'. Here's the code tree for reference:</p>
  
  <pre><code>def create():
      global side_a
      side_a = format(random.uniform(1,100),'.0f')
      global side_b
      side_b = format(random.uniform(1,100),'.0f')
      global angle_a
      angle_a = format(random.uniform(1,180),',.3f')
      global angle_b
      angle_b = ANGLE_B()
  
  def ANGLE_B():
      ang = format(math.asin(side_b*(math.sin(angle_a)/side_a)),'.3f')
      return ang
  </code></pre>
  
  <p>I have tried numerous combinations of converting <code>ang</code> in the <code>ANGLE_B()</code> block into a floating point number such as <code>ang = float(ang)</code> yet i've had no luck. Can anyone help? I keep getting <code>TypeError: a float is required</code> when I run it in CMD.</p>