{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "97b9fc18",
   "metadata": {},
   "source": [
    "# 05-08 · Negatywne floor-division\n",
    "\n",
    "Praktyka do sekcji [„Negatywne floor-dzielenie”](/pl/chapters/rozdzial-05/05-08-otricatelnoe-delenie.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e9bd6ef9",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Przewiduj wynik // i % dla liczb ujemnych."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "78382cab",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d5cb3074",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T12:02:49.505428Z",
     "iopub.status.busy": "2026-08-16T12:02:49.505243Z",
     "iopub.status.idle": "2026-08-16T12:02:49.529543Z",
     "shell.execute_reply": "2026-08-16T12:02:49.529174Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-4\n",
      "1\n"
     ]
    }
   ],
   "source": [
    "print(-7 // 2)\n",
    "print(-7 % 2)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "51ed63e1",
   "metadata": {},
   "source": [
    "## Eksperyment 1 · Przewidź przed uruchomieniem\n",
    "\n",
    "Przewidź wynik, a potem przetestuj."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "d761bfe1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T12:02:49.530846Z",
     "iopub.status.busy": "2026-08-16T12:02:49.530678Z",
     "iopub.status.idle": "2026-08-16T12:02:49.533642Z",
     "shell.execute_reply": "2026-08-16T12:02:49.533207Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-4\n",
      "-1\n"
     ]
    }
   ],
   "source": [
    "print(7 // -2)\n",
    "print(7 % -2)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "51e59fa1",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Wycofanie się `-17 // 5` oraz `-17 % 5` przez spację jednym print()."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "69d62bf1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T12:02:49.534919Z",
     "iopub.status.busy": "2026-08-16T12:02:49.534789Z",
     "iopub.status.idle": "2026-08-16T12:02:49.537165Z",
     "shell.execute_reply": "2026-08-16T12:02:49.536686Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-4 3\n"
     ]
    }
   ],
   "source": [
    "print(-17 // 5, -17 % 5)"
   ]
  }
 ],
 "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
}
