Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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 :: python inheritance remove an attribute 
Python :: python code to wait 
Python :: how to add subplots for histogram in pandas 
Python :: how to send a message from google form to a python 
Python :: yum install python3 
Python :: how to get current page url in django template 
Python :: how to add headers in csv file using python 
Python :: filter function using lambda in python 
Python :: clear pygame screen 
Python :: python import specific excel sheet 
Python :: splitting a string and appending each character to a list python 
Python :: random element python 
Python :: alarm when code finishes 
Python :: python remove directory not empty 
Python :: python command not found 
Python :: django form datepicker 
Python :: python get financial data 
Python :: python change base function 
Python :: sort json python 
Python :: QTableWidget as a button pyqt 
Python :: how to clean a mask cv2 in python 
Python :: numpy ones 
Python :: one line input in python 
Python :: pandas read csv as strings 
Python :: python better while loop that count up 
Python :: django get user model funciton 
Python :: Qslider pyqt 
Python :: python subtract one list from another 
Python :: replace url with text python 
Python :: can you print to multiple output files python 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =