Create NumPy array with pattern III
This one is a bit tricky. Create a NumPy array with the pattern below. Include the functions
np.full()
and np.zeros()
in your solution.import numpy as np
# create the following array
# [
# [ 9 9 9 9 9 ],
# [ 9 0 0 0 9 ],
# [ 9 0 1 0 9 ],
# [ 9 0 0 0 9 ],
# [ 9 9 9 9 9 ],
# ]
# create array here (you will need multiple lines)
a =
print(a)
Python
Setting up Python environment...
Output