...

/

Coding Challenge Solutions #2

Coding Challenge Solutions #2

This lesson contains the solutions and explanations of the challenges in the lesson: Representing Data with NumPy.

We'll cover the following...

Coding challenge 1 solution

import numpy as np
def thirdElement():
arr = np.array([1, 2, 3, 4, 5])
thirdEl = arr[2]
return thirdEl

Explanation

Note: The first position in an array is at index 0 and not at index 1. ...