# let's define both vectors
u = [-3,-2,0,-1,4]
v = [-1,-1,2,-3,5]

uv = 0; # summation is initially zero

for i in range(len(u)): # iteratively access every pair with the same indices
    print("pairwise multiplication of the entries with index",i,"is",u[i]*v[i])
    uv = uv + u[i]*v[i] # i-th entries are multiplied and then added to summation
    
print() # print an empty line    
print("The dot product of",u,'and',v,'is',uv)

#
# your solution is here
#


#
# your solution is here
#


# let's find the dot product of v and u
v = [-4,0]
u = [0,-5]
result = 0;

for i in range(2):
    result = result + v[i]*u[i]

print("the dot product of u and v is",result)

# we can use the same code
v = [-4,3]
u = [-3,-4]
result = 0;

for i in range(2):
    result = result + v[i]*u[i]

print("the dot product of u and v is",result)

# you may consider to write a function in Python for dot product

#
# your solution is here
#


#
# your solution is here
#


