From 2cda2f408d6da42e800ab229763eccfd8799e4dc Mon Sep 17 00:00:00 2001 From: Thambapanni-Designs <116666202+Thambapanni-Designs@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:02:57 +0530 Subject: [PATCH] Create code to find distance between points Create code to find distance between points --- distance between points.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 distance between points.py diff --git a/distance between points.py b/distance between points.py new file mode 100644 index 00000000..d6da6363 --- /dev/null +++ b/distance between points.py @@ -0,0 +1,11 @@ +import math + +x1 = float(input("Enter x1: ")) +y1 = float(input("Enter y1: ")) +x2 = float(input("Enter x2: ")) +y2 = float(input("Enter y2: ")) + +distance = math.sqrt((x2 - x1)**2 + (y2 - y1)**2) + + +print("The distance between the points is :",distance)