''' distance_two_points.py
calculate the distance between two points given the coordinates
of the points (x1, y1) and (x2, y2) in a 2D system
'''
import math
def get_distance(x1, y1, x2, y2):
'''
returns distance between two points using the pythagorean theorem
the function parameters are the 2D coordinates of the two points
'''
dx = x2 - x1
dy = y2 - y1
return math.sqrt(dx**2 + dy**2)
sf = "Distance between point({}, {}) and point({}, {}) is {}"
x1, y1 = 1, 3
x2, y2 = 4, 7
print(sf.format(x1, y1, x2, y2, get_distance(x1, y1, x2, y2)))
x1, y1 = 2, 5
x2, y2 = 11, 23
print(sf.format(x1, y1, x2, y2, get_distance(x1, y1, x2, y2)))
''' result ...
Distance between point(1, 3) and point(4, 7) is 5.0
Distance between point(2, 5) and point(11, 23) is 20.1246117975
'''

Write a program that displays all numbers divisible by 3 and 4 within a range entered by user. Display five numbers per line. Numbers are separated by exactly two spaces. ...

Hi guys. I am trying to create a program where the user inputs an integer and the program will cout the nth prime number. Unfortunatly when I try to cout ...

Hello Friends,
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...