- Complete all the following tasks using NumPy and Matplotlib.
- Write clean and readable code.
- Each function should return the required output.
- Do not hardcode answers.
- Create a NumPy array containing numbers from 1 to 10.
- Create a 3x3 matrix filled with zeros.
- Create a 3x3 identity matrix.
- Create an array with values from 10 to 50 with a step of 5.
-
Given two arrays: a = [1, 2, 3]
b = [4, 5, 6]Perform:
- Element-wise addition
- Element-wise subtraction
- Element-wise multiplication
- Element-wise division
- Create an array from 0 to 19.
- Extract:
- First 5 elements
- Last 5 elements
- Elements from index 5 to 10
- Reverse the array.
- Create two 2x2 matrices and perform:
- Matrix multiplication
- Transpose of a matrix
- Determinant of a matrix
- Generate:
- 5 random numbers between 0 and 1
- A 3x3 matrix with random integers between 1 and 10
- Find the maximum and minimum values from the generated array.
- Plot the graph of:
- y = x^2
- y = x^3
For x values from 0 to 10.
- Add:
- Title
- X and Y labels
- Legend
- Submit your completed
assignment.pyfile. - Ensure all functions are implemented correctly.
- Code will be evaluated using automated tests.
- Correctness: 60%
- Code Quality: 20%
- Visualization: 20%