{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e02e20e6",
   "metadata": {},
   "source": [
    "# 09-10 · Łańcuchy porównawcze\n",
    "\n",
    "Praktyka do sekcji [„Łańcuchy porównań”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6175a7af",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Opanuj zapis w rodzaju a <= x <= b do sprawdzania zakresu."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6ed0624d",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a95e0f14",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T17:23:02.606561Z",
     "iopub.status.busy": "2026-08-16T17:23:02.606373Z",
     "iopub.status.idle": "2026-08-16T17:23:02.633731Z",
     "shell.execute_reply": "2026-08-16T17:23:02.633122Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n"
     ]
    }
   ],
   "source": [
    "age = 30\n",
    "print(18 <= age <= 65)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1920208a",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Sprawdź, czy age=30 mieści się w zakresie 18..65, a score=105 jest w zakresie 0..100."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "2d06f204",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T17:23:02.634689Z",
     "iopub.status.busy": "2026-08-16T17:23:02.634572Z",
     "iopub.status.idle": "2026-08-16T17:23:02.637106Z",
     "shell.execute_reply": "2026-08-16T17:23:02.636638Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True False\n"
     ]
    }
   ],
   "source": [
    "age = 30\n",
    "in_range = 18 <= age <= 65\n",
    "\n",
    "score = 105\n",
    "valid_score = 0 <= score <= 100\n",
    "print(in_range, valid_score)"
   ]
  }
 ],
 "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
}
