#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 19 08:40:52 2022

@author: cpresser
"""

"""
imports
"""
import math


"""
constants and global variables
"""
NUMBER_OF_VALUES = 4


"""
define functions
"""

def distance(x1, y1, x2, y2):
    dx = x1-x2
    dy = y1-y2
    return math.sqrt(dx**2 + dy**2)


"""
Variables used in the main portion of the program
"""

coords = []

"""
Main program statements
"""
print("Enter x1, y2, x2 and y2")
for i in range(NUMBER_OF_VALUES):
    v = float(input(f"Enter the next coordinate {i+1}: "))
    coords.append(v)
    
dist = distance(coords[0], coords[1], coords[2], coords[3])
print(f"The distance is {dist}.")