Vector sum

Report a typo

Given two equally-sized vectors v1 and v2, calculate their vector sum by adding their coordinates element-wise. The vectors will always be of the same dimension. Print out each obtained coordinate on a new line, for example, for v1 = (1, 5) and v2 = (2, 3), the result will be as follows:

3
8

Assume that the tuples v1 and v2 have been defined in advance and are ready to use.

Write a program in Python 3





___

Create a free account to access the full topic