{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d9aaa611",
   "metadata": {},
   "source": [
    "# 11-25 · Мини-проект — частота слов\n",
    "\n",
    "Практика к разделу [«Мини-проект — подсчёт частоты слов»](../../site/chapters/glava-11/11-25-slovar-chastoty-slov.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f234369e",
   "metadata": {},
   "source": [
    "## Цель\n",
    "\n",
    "Подсчитать частоту слов в тексте через словарь."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7f638960",
   "metadata": {},
   "source": [
    "## Задание ★ Базовая практика"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "80f30826",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-17T14:44:59.377308Z",
     "iopub.status.busy": "2026-08-17T14:44:59.377156Z",
     "iopub.status.idle": "2026-08-17T14:44:59.401185Z",
     "shell.execute_reply": "2026-08-17T14:44:59.400598Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'python': 2, 'is': 2, 'great': 1, 'and': 2, 'fun': 1, 'simple': 1}\n"
     ]
    }
   ],
   "source": [
    "text = \"python is great and python is fun and simple\"\n",
    "words = text.lower().split()\n",
    "\n",
    "counts = {}\n",
    "for word in words:\n",
    "    counts[word] = counts.get(word, 0) + 1\n",
    "\n",
    "print(counts)"
   ]
  }
 ],
 "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
}
