Bobby is troubleshooting a challenge he is attempting on Innokodakademija. He needs to devise a function whose argument is the size of a square array. The function must return the array with the diagonals set to 1 and all the other members set to 0. His code is in the Code tab. Two of the lines contain bugs. Can you help him?
help_bobby(1) ➞ [[1]]
help_bobby(3) ➞ [
[1, 0, 1],
[0, 1, 0],
[1, 0, 1]
]
help_bobby(4) ➞ [
[1, 0, 0, 1],
[0, 1, 1, 0],
[0, 1, 1, 0],
[1, 0, 0, 1]
]
N/A