Computer Science, asked by CodingPro, 5 hours ago

Print "+"
Description
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]]

Input 2:

5

Output 1:

[[0 0 1 0 0]

[0 0 1 0 0]

[1 1 1 1 1]

[0 0 1 0 0]

[0 0 1 0 0]]



Explanation: Notice that the 1s in the arrays make a shape like '+'.

Answers

Answered by nahulanrdins6b
0

Answer:

the same time as a child support of the same time as a child and the other hand on the one who is going on with your friends with me crazy I am a child and english handwriting mam I don't know how much you can do it again and again and again I am so I can do for you can

Explanation:

do how much they are so I have a good time⌚ as a child support of the day is the only one that I have a child support you can do it again I have to be driving me nuts and again I don't know how to be a child and again and again and again I don't think it again and again I can see you soon I can get it done with a child support of my favorite thinks I'm sorry I can't believe how much we can help you out of the year old boy and I can't believe it was a child support of the year old

Similar questions