{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6r8cCDzaHBB1"
      },
      "source": [
        "# Import NumPy"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "fpJWG_izG9oT"
      },
      "outputs": [],
      "source": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "H81OK2uuGI-m"
      },
      "source": [
        "# 1. Creating a NumPy Array\n",
        "- Create a NumPy array with the following integers: 5, 10, 15, 20, 25, 30.\n",
        "\n",
        "- Then, create a 2D array of shape (2, 3) using the same numbers."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "NLnz69U7GCmB"
      },
      "outputs": [],
      "source": []
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "A2-cDbyNG3r-"
      },
      "outputs": [],
      "source": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "992WOLCsGezk"
      },
      "source": [
        "# 2. Array Functions\n",
        "\n",
        "## Given the array:\n",
        "\n",
        "    arr = np.array([3, -5, 7, 2, -8, 0])\n",
        "  \n",
        "### Use NumPy functions to:\n",
        "\n",
        "- Find the absolute values of the elements\n",
        "- Sort the array\n",
        "- Return only the positive numbers"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "LANAOo3jGezk"
      },
      "outputs": [],
      "source": []
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "lo2NH0AsG7mj"
      },
      "outputs": [],
      "source": []
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "tzGhlMxWG7qP"
      },
      "outputs": [],
      "source": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "xTQ0Dj-BGe_4"
      },
      "source": [
        "# 3. Arithmetic Operations\n",
        "## Given two arrays:\n",
        "```\n",
        "a = np.array([1, 2, 3])  \n",
        "b = np.array([4, 5, 6])\n",
        "```\n",
        "\n",
        "\n",
        "\n",
        "### Perform the following element-wise operations:\n",
        "\n",
        "- Addition\n",
        "- Multiplication\n",
        "- Raise each element of **a** to the power of the corresponding element in **b**"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "id": "BEiH_0-eGe_4"
      },
      "outputs": [],
      "source": [
        "#Add a and b"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 2,
      "metadata": {
        "id": "Zf8NKbmYHe_Y"
      },
      "outputs": [],
      "source": [
        "#Multiply a and b"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "metadata": {
        "id": "eH3gnVxvHfCB"
      },
      "outputs": [],
      "source": [
        "#Exponentiation of a to b"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "mqsyNpHfHt_-"
      },
      "source": [
        "# 4. Statistical Functions\n",
        "### Generate a NumPy array with 20 random integers between 1 and 100.\n",
        "\n",
        "Using your array Calculate:\n",
        "-  mean\n",
        "- median\n",
        "- standard deviation\n",
        "- maximum and minimum values"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 4,
      "metadata": {
        "id": "ktTmz5NZKNPi"
      },
      "outputs": [],
      "source": [
        "#generate the array"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "metadata": {
        "id": "sd9hpn-NHxLU"
      },
      "outputs": [],
      "source": [
        "#array mean"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 6,
      "metadata": {
        "id": "Ml5CIAZyIWs2"
      },
      "outputs": [],
      "source": [
        "#array median"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 7,
      "metadata": {
        "id": "IPMc3KW6IXAj"
      },
      "outputs": [],
      "source": [
        "#array standard deviation"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 8,
      "metadata": {
        "id": "8eSbwyP6IXHv"
      },
      "outputs": [],
      "source": [
        "#array max and min"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "66PU3L1hIx-C"
      },
      "source": [
        "# 5. Array Indexing (2 Problems)\n",
        "## Problem 1:\n",
        "- Create a 3x3 array filled with numbers from 1 to 9.\n",
        "- Retrieve the element in the second row, third column.\n",
        "\n",
        "## Problem 2:\n",
        "### Given the array:\n",
        "```\n",
        "arr = np.array([[11, 12, 13], [21, 22, 23], [31, 32, 33]])\n",
        "```\n",
        "- Access and print **all elements in the last column**.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 9,
      "metadata": {
        "id": "YQVlQnLQIyQC"
      },
      "outputs": [],
      "source": [
        "#5.1"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "metadata": {
        "id": "cW0G9_5wJNqW"
      },
      "outputs": [],
      "source": [
        "#5.2"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "vubnttwCJQvK"
      },
      "source": [
        "# 6. Slicing Arrays (2 Problems)\n",
        "## Problem 1:\n",
        "Given an array of numbers from 0 to 19:\n",
        "- Extract every third element starting from index 2.\n",
        "## Problem 2:\n",
        "Given a 4x4 array:\n",
        "\n",
        "```\n",
        "arr = np.array([[10, 20, 30, 40],  \n",
        "                [50, 60, 70, 80],  \n",
        "                [90, 100, 110, 120],  \n",
        "                [130, 140, 150, 160]])\n",
        "```\n",
        "- Extract the subarray containing the middle 2x2 elements.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 11,
      "metadata": {
        "id": "lp2Gg2X3JmXg"
      },
      "outputs": [],
      "source": [
        "#6.1"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 12,
      "metadata": {
        "id": "cN-pRxobJn8-"
      },
      "outputs": [],
      "source": [
        "#6.2"
      ]
    }
  ],
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.12.11"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
