math4610

Routine Name: vectorAdd

Author: David Merkley

Language: Python

Description/Purpose: Adds two vectors

Input: two vectors

Output: sum of vectors

Implementation/Code:

def vectorAdd(x, y):
    return [x[i] + y[i] for i in range(len(x))]