title: Solve Triangle using Cosine in Python
body: <p>Hi I'm new here and I dont really understand python or code in general but I'm trying and I been trying for 2-3 hours and I'm trying to</p>
  
  <p>"Consider a triangle with sides of length 3, 7, and 9. The law of cosines states that given three sides of a triangle (a, b, and c) and angle C between sides a and b: 
   c^2 = b^2 +a^2 - 2 * a * b * cos(C)
  Write Python code to calculate the three angles in the triangle."</p>
  
  <p>This is a home work assignment and this is HARD!!!!!!!!!!!!!!
  Heres what I done so far...</p>
  
  <pre><code>  import math
  
    a_float = 3 
    b_float = 7 
    c_float = 9
  
    def find_angle_cosine_of_c_float =
  
   (c_float**2-b_float**2-a_float**2)/(-2*a_float*b_float)
  
    a = input("enter A: ") 
    b = input("enter B: ") 
    c = input("enter C: ")
  
    angle_c_float = math.acos(cosine_of_float)
  
    angle_c_float = angle_c_float*180/math.pi
  
    assert find_angle_cosine_of_c_float(7, 9, 3)
    assert find_angle_cosine_of_c_float(3, 7, 9) 
    assert find_angle_cosine_of_c_float(9, 3, 7)
  
    Return angle(angle_c_float)
  </code></pre>
  
  <p>If it looks like a pile of nonsense that's because it is........</p>