Computer Science, asked by takecareiloveyou, 5 months ago

Given a single positive odd integer 'n' greater than 2, create a NumPy array of size (n x n) with all zeros and ones such that the ones make a shape like '+'. The lines of the plus must be present at the middle row and column.



Hint: Start by creating a (n x n) array with all zeroes using the np.zeros() function and then fill in the ones at the appropriate indices. Use integer division (//) to access the middle rows and columns



Examples:

Input 1:

3

Output 1:

[[0 1 0]

[1 1 1]

[0 1 0]]

Answers

Answered by tabish34
0

Answer:

hsgisitsigsigzigzigzifUfUfzoysitsifsogfisifsifzifzifigzifzkgz

Answered by vikassainimzn
6

Answer:

answer is input :1

Explanation:

follow me

Similar questions