I have this task but I am getting this error can you please help?

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

I have this task but I am getting this error can you please help?

Post by answerhappygod »

I have this task
I Have This Task But I Am Getting This Error Can You Please Help 1
I Have This Task But I Am Getting This Error Can You Please Help 1 (69.79 KiB) Viewed 59 times
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply