{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "3af22fa8",
   "metadata": {},
   "source": [
    "# 04-18 · Płaszczyzna zespolona\n",
    "\n",
    "Praktyka do sekcji [„complex i cmath”](/pl/chapters/rozdzial-04/04-18-kompleksnye-chisla.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e352a258",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Opanować real, imag i abs() dla liczb zespolonych."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "37f8ae43",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "43a08b22",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:47.873423Z",
     "iopub.status.busy": "2026-08-16T10:03:47.873140Z",
     "iopub.status.idle": "2026-08-16T10:03:47.889493Z",
     "shell.execute_reply": "2026-08-16T10:03:47.889014Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3.0\n",
      "4.0\n"
     ]
    }
   ],
   "source": [
    "z = 3 + 4j\n",
    "print(z.real)\n",
    "print(z.imag)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6174412a",
   "metadata": {},
   "source": [
    "## Eksperyment 1\n",
    "\n",
    "Sprawdź, że abs() to długość wektora od początku początku."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c482fef6",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:47.890542Z",
     "iopub.status.busy": "2026-08-16T10:03:47.890424Z",
     "iopub.status.idle": "2026-08-16T10:03:47.892598Z",
     "shell.execute_reply": "2026-08-16T10:03:47.892195Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5.0\n"
     ]
    }
   ],
   "source": [
    "z = 3 + 4j\n",
    "print(abs(z))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3ddcee51",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Utwórz z = 5 + 12j i wygeneruj jego moduł."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b9d54a30",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:47.893548Z",
     "iopub.status.busy": "2026-08-16T10:03:47.893442Z",
     "iopub.status.idle": "2026-08-16T10:03:47.895678Z",
     "shell.execute_reply": "2026-08-16T10:03:47.895231Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "13.0\n"
     ]
    }
   ],
   "source": [
    "z = 5 + 12j\n",
    "print(abs(z))"
   ]
  }
 ],
 "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
}
