How can I perform calculations in python using two lists? Where the first calculation would be, c = -(1)/cos(4), second being, c = -(5)/cos(6), etc
import numpy as np
x, y = [1,5,2,1], [4,6,2,3]
c = []
c = -x/(np.cos(y))
print(c)
When I try this I currently get the error :
TypeError: bad operand type for unary -: 'list'
list
like a numpy-array? (if so, why avoid numpy?) Or do you want to learn how to use numpy arrays?