I have this task but I am getting this error can you please help?
Posted: Sat May 14, 2022 3:05 pm
I have this task
but I am getting this error can you please help?
Complete the program shown in the 'Answer' box below by filling in the blank so that the program prints [1-4 0 0 0 4] [ 0 4 0 -4 0]] Answer: 1 import numpy as np 2 3. def mantaray(fins): 4 i, j = fins.shape 5 fishies = np. full(i, j), i - j) 6 sting = (fins + fishies) * 2 7 print(sting) 8 9 mantaray(['a', np.array([2, 8]), 'c', 'd'], 5) HNMOON DOO Check Expected Got x x [[-4 0 0 0 [ 0 4 0-4 4] *** RUN TIME ERROR(S) *** 0]] Traceback (most recent call last): File "_source.py", line 9, in <module> mantaray((['a', np.array([2, 8]), 'c': 'd'], 5)) File "_source.py", line 4, in mantaray i, j = fins.shape AttributeError: 'tuple' object has no attribute 'shape' Testing was aborted due to runtime errors. Show differences Incorrect Marks for this submission: 0.00/1.00.
but I am getting this error can you please help?
Complete the program shown in the 'Answer' box below by filling in the blank so that the program prints [1-4 0 0 0 4] [ 0 4 0 -4 0]] Answer: 1 import numpy as np 2 3. def mantaray(fins): 4 i, j = fins.shape 5 fishies = np. full(i, j), i - j) 6 sting = (fins + fishies) * 2 7 print(sting) 8 9 mantaray(['a', np.array([2, 8]), 'c', 'd'], 5) HNMOON DOO Check Expected Got x x [[-4 0 0 0 [ 0 4 0-4 4] *** RUN TIME ERROR(S) *** 0]] Traceback (most recent call last): File "_source.py", line 9, in <module> mantaray((['a', np.array([2, 8]), 'c': 'd'], 5)) File "_source.py", line 4, in mantaray i, j = fins.shape AttributeError: 'tuple' object has no attribute 'shape' Testing was aborted due to runtime errors. Show differences Incorrect Marks for this submission: 0.00/1.00.