{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "cc8b24d8",
   "metadata": {},
   "source": [
    "# 04-02 · Jednostki miar i komentarze\n",
    "\n",
    "Praktyka do sekcji [„Komentarze w obliczeniach”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3496f86d",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Uczyń kod liczbowy zrozumiałym dzięki znaczącym nazwom i komentarzom do formuł."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "018ae014",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b9773444",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:15.053911Z",
     "iopub.status.busy": "2026-08-16T10:03:15.053809Z",
     "iopub.status.idle": "2026-08-16T10:03:15.069376Z",
     "shell.execute_reply": "2026-08-16T10:03:15.069020Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "120\n"
     ]
    }
   ],
   "source": [
    "distance = 120  # км\n",
    "print(distance)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5c2fb0e7",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Przepisz zmienną `distance` w `distance_km`, dodaj zmienną `price` dla kosztu i zmień jej nazwę na `price_usd`. Wyciągnij oba."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "1dbe52df",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:15.070641Z",
     "iopub.status.busy": "2026-08-16T10:03:15.070532Z",
     "iopub.status.idle": "2026-08-16T10:03:15.072729Z",
     "shell.execute_reply": "2026-08-16T10:03:15.072329Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "120\n",
      "49\n"
     ]
    }
   ],
   "source": [
    "distance_km = 120\n",
    "price_usd = 49\n",
    "print(distance_km)\n",
    "print(price_usd)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2a14592d",
   "metadata": {},
   "source": [
    "## Samodzielna praktyka ★★\n",
    "\n",
    "Napisz linijkę z VAT (jak w lekcji), dodając komentarz wyjaśniający stawkę i oblicz całkowitą kwotę."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d68a39df",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T10:03:15.073601Z",
     "iopub.status.busy": "2026-08-16T10:03:15.073501Z",
     "iopub.status.idle": "2026-08-16T10:03:15.075714Z",
     "shell.execute_reply": "2026-08-16T10:03:15.075261Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "123.0\n"
     ]
    }
   ],
   "source": [
    "# VAT w studium przypadku: 23%\n",
    "vat_rate = 0.23\n",
    "price = 100\n",
    "total = price * (1 + vat_rate)\n",
    "print(total)"
   ]
  }
 ],
 "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
}
