{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "9203de69",
   "metadata": {},
   "source": [
    "# 04-19 · Moduł math\n",
    "\n",
    "Praktyka do sekcji [„Moduł math”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a69a19cb",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Opanowanie głównych grup funkcji modułu math."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9039f151",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "bd2ff41a",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:49.820816Z",
     "iopub.status.busy": "2026-08-16T10:03:49.820624Z",
     "iopub.status.idle": "2026-08-16T10:03:49.841769Z",
     "shell.execute_reply": "2026-08-16T10:03:49.841199Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4.0\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "print(math.sqrt(16))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "95019d59",
   "metadata": {},
   "source": [
    "## Eksperyment 1\n",
    "\n",
    "Spróbuj matematyki całkowitej."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "932f1572",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:49.843044Z",
     "iopub.status.busy": "2026-08-16T10:03:49.842913Z",
     "iopub.status.idle": "2026-08-16T10:03:49.845527Z",
     "shell.execute_reply": "2026-08-16T10:03:49.845077Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "120\n",
      "6\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "print(math.factorial(5))\n",
    "print(math.gcd(12, 18))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "88782450",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Oblicz przeciwprostokątną trójkąta z przyprostokątnymi 6 i 8 przez math.hypot()."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "bd3abf6b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:49.846644Z",
     "iopub.status.busy": "2026-08-16T10:03:49.846531Z",
     "iopub.status.idle": "2026-08-16T10:03:49.848816Z",
     "shell.execute_reply": "2026-08-16T10:03:49.848393Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "10.0\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "print(math.hypot(6, 8))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Cartesian Python 3.14",
   "language": "python",
   "name": "cartesian-python314"
  },
  "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.14.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
