문제 풀이
(1) + = (-4, 5) + (-2, 8)
= ((-4) + (-2), 5 + 8) = (-6, 13)
In [21]:
import numpy as np x = [-4,5] y = [-2,8] u = np.array(x) v = np.array(y) w = u+v print(w)
[-6 13]
(2) + = (11, 2) + (4, -3)
= (11 +4, 2 + (-3)) = (15, -1)
In [22]:
import numpy as np x = [11,2] y = [4,-3] u = np.array(x) v = np.array(y) w = u+v print(w)
[15 -1]
(3) + = (-13, 53) + (-13, 53) + (-25, -34)
= ((-13) + (-25), 54 + (-34)) = (-38, 19)
In [23]:
import numpy as np x = [-13,53] y = [-25,-34] u = np.array(x) v = np.array(y) w = u+v print(w)
[-38 19]