{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "a3f8998d",
   "metadata": {},
   "source": [
    "#09-13 · Kilka if ≠ if/elif/else\n",
    "\n",
    "Praktyka do sekcji [„Kilka if ≠ if/elif/else”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "903f06aa",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Zobaczyć różnicę między niezależnymi if a łańcuchem elif."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8711f6a3",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a71fe8c7",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T17:23:05.069145Z",
     "iopub.status.busy": "2026-08-16T17:23:05.069016Z",
     "iopub.status.idle": "2026-08-16T17:23:05.085741Z",
     "shell.execute_reply": "2026-08-16T17:23:05.085255Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "тепло\n",
      "жарко\n"
     ]
    }
   ],
   "source": [
    "temperature = 30\n",
    "if temperature > 20:\n",
    "    print(\"тепло\")\n",
    "if temperature > 25:\n",
    "    print(\"жарко\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6423a054",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Sprawdź, czy OBA niezależne warunki działają jednocześnie dla temperature = 30."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "2749be98",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T17:23:05.086769Z",
     "iopub.status.busy": "2026-08-16T17:23:05.086655Z",
     "iopub.status.idle": "2026-08-16T17:23:05.088951Z",
     "shell.execute_reply": "2026-08-16T17:23:05.088550Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True True True\n"
     ]
    }
   ],
   "source": [
    "temperature = 30\n",
    "warm_triggered = temperature > 20\n",
    "hot_triggered = temperature > 25\n",
    "both_triggered = warm_triggered and hot_triggered\n",
    "print(warm_triggered, hot_triggered, both_triggered)"
   ]
  }
 ],
 "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
}
