Hi @fariiha12.
Welcome to the community.
Your error is due to the arguments you supplied in the f_of_omega function. Kindly go through it again and try. I’m sure you can resolve it.
thanks a lot i solve it but 3exercise difficult for me
Parameter endpoint=True will allow ending point 1 to be included in the array.
This is why it is better to take N = 1001, not N = 1000
N = 1001
omega_array = np.linspace(0, 1, N, endpoint=True)
This is organised as a function only for grading purposes.
def L_of_omega_array(omega_array, pA, pB):
N = len(omega_array)
L_array = np.zeros(N)
for i in range(N):
### START CODE HERE ### (~ 2 lines of code)
L = None(None[None], None, None)
L_array = L_array.at[None].set(None)
### END CODE HERE ###
return L_array
L_array = L_of_omega_array(omega_array, prices_A, prices_B)
how to solve it
You need to fill in two lines of code, replacing the “None” text with the correct code.
For the first line:
You replace the first None with the correct function name. Hint: It’s the function that computes “L of omega”.
That function accepts three arguments. The first None is an array name, the next None is that array’s index. The last two Nones are that function’s other arguments.
For the second line:
You replace the first None with an index variable.
You replace the second None with the the variable name that was returned by the first line (see above).