#loading library
import numpy as np
# Create a random vector of coordinates
vec = np.random.rand(5, 2)
# Create an empty array to store the distances
distances = np.zeros((5, 5))
# Calculate the distances between all pairs of points using nested loops
for i in range(100):
for j in range(i+1, 5):
distances[i, j] = np.sqrt(((vec[i] - vec[j]) ** 2).sum())
distances[j, i] = distances[i, j]
#printing result
print(distances)