{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f153bae5",
   "metadata": {},
   "source": [
    "# 11-19 · Operacje zbiorów i możliwość hasowania\n",
    "\n",
    "Praktyka do sekcji [„Operacje ustawiania i haszaczność”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fdb0e9cd",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Zastosowanie walidacji spójek, przecięcia, różnicy i podzbiorów."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c858910c",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Dano `required = {\"python\", \"git\", \"sql\"}` oraz `available = {\"python\", \"git\", \"docker\"}`. Dowiedz się, jakich umiejętności brakuje (`missing`), które już tam są (`common`), połączenie wszystkich umiejętności (`vse`), i sprawdzić, czy `{\"python\", \"git\"}` pod zbiórm `available` (`podmnozhestvo`)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3e3339c2",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-17T14:44:47.880299Z",
     "iopub.status.busy": "2026-08-17T14:44:47.880189Z",
     "iopub.status.idle": "2026-08-17T14:44:47.896895Z",
     "shell.execute_reply": "2026-08-17T14:44:47.896415Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'sql'}\n",
      "{'git', 'python'}\n",
      "{'sql', 'docker', 'git', 'python'}\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "required = {\"python\", \"git\", \"sql\"}\n",
    "available = {\"python\", \"git\", \"docker\"}\n",
    "\n",
    "missing = required - available\n",
    "common = required & available\n",
    "vse = required | available\n",
    "podmnozhestvo = {\"python\", \"git\"} <= available\n",
    "\n",
    "print(missing)\n",
    "print(common)\n",
    "print(vse)\n",
    "print(podmnozhestvo)"
   ]
  }
 ],
 "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
}
