0% found this document useful (0 votes)
1 views1 page

Assignment numpy

The document outlines a programming assignment focused on using NumPy, which includes tasks such as creating 2D and 1D arrays, finding minimum and maximum values, sorting, and manipulating array elements. Specific tasks involve generating random integers, replacing even numbers, applying mathematical functions, and calculating sums. The assignment aims to enhance understanding of array operations and statistical analysis using NumPy.

Uploaded by

harithmsylhy3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Assignment numpy

The document outlines a programming assignment focused on using NumPy, which includes tasks such as creating 2D and 1D arrays, finding minimum and maximum values, sorting, and manipulating array elements. Specific tasks involve generating random integers, replacing even numbers, applying mathematical functions, and calculating sums. The assignment aims to enhance understanding of array operations and statistical analysis using NumPy.

Uploaded by

harithmsylhy3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment Numpy (intro to programming):

1. Create a 2D Numpy array with shape (3, 3) containing random integers


between 1 and 20.

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

You might also like