Assignment numpy
Assignment numpy
2. Write a NumPy program to create a 5x5 array with random values and find
the minimum and maximum values for each row.
3. Write a NumPy program to create a random vector of size 10 and sort it.
4. Write a NumPy program to find the most frequent value in an array.
5. Replace all even numbers in the 2D array with 0.
6. Apply the square root function to each element of the 1D array.
7. Write a NumPy program to create a 3x3 array with random values and
subtract the mean of each row from each element.
8. Create a 1D array containing the first 20 odd numbers.
9. Write a NumPy program to create a 5x5 array with random values and find
the second-largest value in each column.
10. Write a NumPy program to create a 4x4 array with random values and find
the sum of each row.
Artificial Intelligence