Basic arrays
Basic arrays
import numpy as np
# Set the dimensions of the array
rows = 5
cols = 4
# Create the 2D array with random integers between 1 and 100
array = np.random.randint(1, 101, size=(rows, cols))
print(array)
2.
import numpy as np
print("Array:\n", array)
print("Index of maximum value:", max_index)
print("Index of minimum value:", min_index)
4.
import numpy as np