Day 1 Work PYTHON
Day 1 Work PYTHON
Objective:
This task will introduce you to the basics of NumPy, a Python library used for working with
arrays and numerical operations. You'll learn how to create NumPy arrays and perform simple
operations on them.
Installation Process
❖ Install Python:
➢ If you don’t have Python installed, download and install it from Python’s official
website.
❖ Install NumPy:
Once Python is installed, open your terminal (or command prompt) and run:
pip install numpy
Work Details
Steps:
Steps:
● Add 5 to every element of the array:
arr_plus_5 = arr + 5
print("Array after adding 5:")
print(arr_plus_5)
● Explanation: These are basic arithmetic operations that apply to all elements of the
array.
3. Multi-dimensional Arrays
Steps:
● Create a 2D NumPy array (a matrix):
matrix = np.array([[1, 2, 3], [4, 5, 6]])
print("2D NumPy Array (Matrix):")
print(matrix)
Steps:
● Explanation: These are basic statistical operations you can perform on NumPy arrays.
Expected Deliverables:
Duration:
Good luck! Feel free to ask for help if you have any questions or need clarification.