I am repeatedly getting 0/30 in the C2_W1_Assignment Exercise 1.
The output from my code exactly matches the expected output.
Failed test case: prices_A has incorrect type.
Expected:
<class ‘jaxlib.xla_extension.DeviceArrayBase’>,
but got:
<class ‘pandas.core.series.Series’>.
Please help me resolve the issue.
Some prices of supplier A: [104. 108. 101. 104. 102.]
Some prices of supplier B: [76. 76. 84. 79. 81.]
Average of the prices, supplier A: 100.799995
Average of the prices, supplier B: 100.0
Expected Output
Some prices of supplier A: [104. 108. 101. 104. 102.]
Some prices of supplier B: [76. 76. 84. 79. 81.]
Average of the prices, supplier A: 100.799995
Average of the prices, supplier B: 100.0
Print some elements and mean values of the prices_A and prices_B arrays.
print(“Some prices of supplier A:”, np.array(prices_A[0:5]))
print(“Some prices of supplier B:”, np.array(prices_B[0:5]))
print(“Average of the prices, supplier A:”, np.mean(np.array(prices_A)))
print(“Average of the prices, supplier B:”, np.mean(np.array(prices_B)))