Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to find exact distance

import math

x1 = int(input("what is x1: "))
y1 = int(input("what is y1: "))
x2 = int(input("what is x2: "))
y2 = int(input("what is y2: "))

eq = (((x1-x2)**2)+((y1-y2)**2))**(1/2)

eqn = eq**2
print("the answer is the square root of",eqn ,"which is", eq)
Comment

PREVIOUS NEXT
Code Example
Python :: multy expresion in python list comprehension 
Python :: find common words in two lists python 
Python :: how to install cuda in anaconda 
Python :: logout in discord.py 
Python :: extract image from pdf python 
Python :: django user group check 
Python :: browser refresh selenium python 
Python :: read excel sheet in python 
Python :: how to exit the program in pygame 
Python :: flask run on ip and port 
Python :: python how to make a server 
Python :: the user to enter their name and display each letter in their name on a separate line python 
Python :: pyhton return annonymous object 
Python :: get most recent file in directory python 
Python :: sns time series plot 
Python :: exclude columns in df 
Python :: export sklearn.metrics.classification_report as csv 
Python :: polarean share price 
Python :: how to access all the elements of a matrix in python using for loop 
Python :: django populate choice field from database 
Python :: mirror 2d numpy array 
Python :: python convert html to text 
Python :: python check disk space 
Python :: how to replace a row value in pyspark dataframe 
Python :: migrate using other database django 
Python :: python count lines in string 
Python :: kivy window size 
Python :: python wait until 
Python :: python read arguments 
Python :: Static Assets in Django 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =