map requires something it can call (function reference, lambda) and a sequence. You supply neither of both. And you also don’t create a tuple, but save a map object to “new_tuple” variable (the parathesis are ignored).

Here’s an example how to use it:

def square(value):
return value * value
new_tuple = tuple(map(square, (1,2,3)))
#(1, 4, 9)

And note that

(map(square, (1,2,3)),)
#(<map object at 0x000000000ADEE8D0>,)

won’t cast the map object to tuple, but create a tuple with a single entry (the map object).

Dunno what is supposed to be calculates, but it’s definately not possible as stated:

Sxx = Sxx + x*x

How would you assign Sxx to itself without setting an initial value?

Maybe something like this?

for x2, y2, xx, yy, xy in map(lambda x, y: (x+x, y+y, x*x, y*y, x*y), m, n):
print("x + x =", x2)
print("y + y =", y2)
print("x * x =", xx)
print("y * y =", yy)
print("x * y =", xy)
#~ x + x = 2
#~ y + y = 2
#~ x * x = 1
#~ y * y = 1
#~ x * y = 1
#~ x + x = 8
#~ y + y = 4
#~ x * x = 16
#~ y * y = 4
#~ x * y = 8
#~ x + x = 18
#~ y + y = 6
#~ x * x = 81
#~ y * y = 9
#~ x * y = 27

##
def vdot(x, y):
# if x == 17 :raise ValueError, ’17 is a bad number’
if len(x) != len(y):
pass
# raise ValueError, 'unequal length'
sum = 0
for a, b in map(None, x, y):
sum = sum + a * b
return sum
###
def vdot1():
# x, y
x=[1,2,3,4,5]
y=[1,2,3,4,5]
v1=vdot(x, y)
print (' V1=',v1)
print (' V2=',v2)
print ()
print ('Result of Vdot =',v1)
###

there is also the line with
if x == 17 :raise ValueError, ’17 is a bad number’

which is not working
did not find any doc on wjy it is refusing the ValueError method

it is suppose to work but might be some changes to this command somehow!