title: Calculating area of a segment in a circle
body: <p>You are given the diameter across, and the length of the segment or chord. The diameter for my question is 12, and the chord is 10. You have to find the height of the shaded segment, and then print the area. The original formula is <code>A=2/3ch + h^3/2c</code>. My classmates got 18 for the area, but when I use my code I get 41. </p>
  
  <p>This is the closest picture representation I can find. However there is a dashed line from <code>ϴ</code> to <code>s</code>.<img src="https://i.stack.imgur.com/j2ZY0.gif" alt="Image retrieved from wolfram.com"></p>
  
  <pre><code>from math import sqrt
  
  diamStr=input("Enter the length of the diameter:   ")
  
  diameter=int(diamStr)
  
  chordStr = input( " Enter the chord length:          ")
  chord = int(chordStr)
  
  
  radius = (diameter/2)
  
  s = sqrt (diameter**2+chord**2)
  
  h = (s/2-radius)
  
  i= (2/3*chord*h)
  
  j=(h**3/2*chord)
  
  area = (i+j)
  
  print (area)
  </code></pre>