Question: Create a 1 0 1 0 matrix ( 2 D numpy array ) A whose entries are given by A m n = 2 m

Create a 1010 matrix (2D numpy array) A whose entries are given by Amn=2m+3n-mn. Indices are
zero-indixed in this definition, i.e. both m and n take integer values from 0 to 9, inclusive.
In your code below, the following variables will be graded:
Name
A
2D numpy array
Description
Matrix to be created
user_code.py
import numpy as np
A=np*zeros((10,10))
np.shape(A)
m=np*array([0,1,2,3,4,5,6,7,8,9])
np. shape (m)
n=np*array([0,1,2,3,4,5,6,7,8,9])
np.shape(n)
8- for m in range(A. shape[0]):
for n in range(A.shape[1]):
10,A=2**m+3**n-m**n
print(A)
 Create a 1010 matrix (2D numpy array) A whose entries are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!