# Program - return dot product of two vectors

## Topic: Program - return dot product of two vectors

Solution

def dot_product(a: "Vector1", b: "Vector2"): return sum( e[0]*e[1] for e in zip(a,b) )

List all Python Programs

Solution

def dot_product(a: "Vector1", b: "Vector2"): return sum( e[0]*e[1] for e in zip(a,b) )

List all Python Programs