title: How to split a user input coordinate and use in calculations?
body: <p>I am trying to calculate the radius of a circle using 2 points given by the user.<br />
  The program works with a simple single integer entry like this ...</p>
  <pre><code>x1 = int(input(&quot;enter x1&quot;))
  y1 = int(input(&quot;enter y1&quot;))
  </code></pre>
  <p>But I wanted to write the input in a way that allows the user to enter a point like this...</p>
  <pre><code>2,5
  </code></pre>
  <p>Below is the code for the program, it will accept the user<br />
  input of x1,y1 and x2,y2, but the calculations are coming out as 0.0.</p>
  <p>What am I missing?</p>
  <pre><code>import math
  
  def distance (x1,y1,x2,y2):
      dis = math.sqrt((x2-x1)**2 + (y2-y1)**2)
      return distance
  
  def radius (x1,y1,x2,y2):
      rad = distance(x1,y1,x2,y2)
      return rad
  
  def main():
  
  coordinate_1 = input(&quot;enter x1 and y1&quot;)
      coordinate_1 = coordinate_1.split(&quot;,&quot;) 
      x1 = int(coordinate_1[0])
      y1 = int(coordinate_1[1])
  
      coordinate_2 = input(&quot;enter x2 and y2&quot;)
      coordinate_2 = coordinate_2.split(&quot;,&quot;) 
      x2 = int(coordinate_1[0])
      y2 = int(coordinate_1[1])
  
      rad = radius(x1,y1,x2,y2)
  
      print(&quot;the radius is:&quot;, rad)
  
  main()
  
  </code></pre>