Advertisement
jabela

distancefinder

Sep 21st, 2019
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import math
  2. x1 = float(input("Please enter x1"))
  3. y1 = float(input("Please enter y1"))
  4. x2 = float(input("Please enter x2"))
  5. y2 = float(input("Please enter y2"))
  6.  
  7. distance = (math.sqrt((x2 - x1)**2 + (y2 - y1)**2))
  8.  
  9. print()
  10. print("The distance between the points entered is", distance)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement