## Q3
import math
def euclidean_distance(p, q):
'''(list, list) -> float
Input: two lists, p and q, of floating point numbers
Output: the Euclidean distance between p and q as a floating
point number
Pre-conditions: p and q have the same size and contain only
floating point numbers.
'''
#(Optional) If pre-condition not true.
if len(p) != len(q):
print("Length of p != q")
return -1
#Computer Distance
sum = 0
for i in range(len(p)):
item = (p[i] - q[i])**2
sum = sum + item
return math.sqrt(sum)
print(euclidean_distance([1, 1], [4, 5]))
print(euclidean_distance([1.5, -1.1, 4], [4.2, 1, -2.3]))