Enrollments closing soon for **Post Graduate Certificate Program in Applied Data Science & AI** By **IIT Roorkee** | 3 Seats Left

- Home
- Assessment

11 / 12

In this assignment, we will have 2 separate Numpy arrays of same length as shown below:

```
import numpy as np
arr1 = np.array([1, 2, 3, 4, 6, 7])
arr2 = np.array([1, 1, 3, 6, 7, 9])
```

We would write a function that would take these 2 arrays (or any other 2 arrays) as parameter, and then return the total number of elements (in the same position) which are different.

- Write a function
`total_diff`

- The function should take 2 different Numpy arrays of same length as parameters
- It should calculate the total number of elements in the same position in both the arrays which are of different values
- Define the 2 arrays given above and then use the
`total_diff`

function on these 2 arrays

XP

Taking you to the next exercise in seconds...

Want to create exercises like this yourself? Click here.

Checking Please wait.

Success

Error

No hints are availble for this assesment

Fetching answer, please wait...

Error

**Note - **Having trouble with the assessment engine? Follow the steps listed
here

## Loading comments...