Create NumPy array with pattern I
Create a NumPy array with the given shape. The first row should contain only zeros, and the second only ones. Include the function
np.zeros()
in your solution.import numpy as np
shape = (2,5)
# start coding here...
a =
print(a)
# expected output: [[0. 0. 0. 0. 0.][1. 1. 1. 1. 1.]]
Python
Setting up Python environment...
Output