{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "54e6a46a",
   "metadata": {},
   "source": [
    "# 10-14 · Поиск, фильтрация и суммирование\n",
    "\n",
    "Практика к разделу [«Поиск, фильтрация и суммирование»](../../site/chapters/glava-10/10-11-poisk-filtr-summa.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e615763d",
   "metadata": {},
   "source": [
    "## Цель\n",
    "\n",
    "Освоить три базовых паттерна: поиск/подсчёт, суммирование, фильтрация."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7b486e4e",
   "metadata": {},
   "source": [
    "## Задание ★ Базовая практика"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4f4c190c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T20:12:51.676282Z",
     "iopub.status.busy": "2026-08-16T20:12:51.676118Z",
     "iopub.status.idle": "2026-08-16T20:12:51.697885Z",
     "shell.execute_reply": "2026-08-16T20:12:51.697417Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "115 [4, 8, 16, 42] 42\n"
     ]
    }
   ],
   "source": [
    "chisla = [4, 8, 15, 16, 23, 42, 7]\n",
    "\n",
    "summa = 0\n",
    "for n in chisla:\n",
    "    summa += n\n",
    "\n",
    "chetnye_chisla = []\n",
    "for n in chisla:\n",
    "    if n % 2 == 0:\n",
    "        chetnye_chisla.append(n)\n",
    "\n",
    "maksimum = chisla[0]\n",
    "for n in chisla:\n",
    "    if n > maksimum:\n",
    "        maksimum = n\n",
    "\n",
    "print(summa, chetnye_chisla, maksimum)"
   ]
  }
 ],
 "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
}
