title: Python degrees defaulting to radians
body: <p>I'm trying to print out the x,y value for a line with a certain degree which intersects a circle with a specified radius.</p>
  
  <p>Lets say for example that the line is pointing straight up at 90 degrees.</p>
  
  <pre><code>import math
  
  degree = 90
  radius = 10
  x = radius * math.cos(degree)
  y = radius * math.sin(degree)
  
  print(x,y)
  </code></pre>
  
  <p>This prints out <em>-4.480736161291701 8.939966636005579</em> but according to my calculator is supposed to print <em>0 10</em> on deg.</p>
  
  <p>I have already tried adding math.radians and math.degrees before the degree var in the x = and y =, but it doesn't come out correctly any time I've tried. The link I found to the point where a line with degree intersects a circle is <a href="https://math.stackexchange.com/questions/260096/find-the-coordinates-of-a-point-on-a-circle">here</a>, the sin/cos values are flipped 'tho for the x and y value in the solution.</p>
  
  <p>Simply said, how would I make the 90 be in degrees instead of radians to get the correct x,y?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>by adding math.radians:</p>
  
  <pre><code>x = radius * math.cos(math.radians(degree))
  y = radius * math.sin(math.radians(degree))
  </code></pre>
  
  <p>it returned 6.123233995736766e-16 10.0</p>
  
  <p>~~~</p>
  
  <p>by adding math.degrees:</p>
  
  <pre><code>x = radius * math.cos(math.degrees(degree))
  y = radius * math.sin(math.degrees(degree))
  </code></pre>
  
  <p>it returned -2.995153947555356 -9.540914674728182</p>