{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "470ba31b",
   "metadata": {},
   "source": [
    "# 12-14 · Журнал оценок\n",
    "\n",
    "Практика к разделу [«Проекты: журнал оценок и корзина покупок»](../../site/chapters/glava-12/12-14-zhurnal-i-korzina.html#zhurnal-ocenok)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "554170c6",
   "metadata": {},
   "source": [
    "## Цель\n",
    "\n",
    "Список словарей + накопитель: среднее, максимум, минимум, отличники."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8ec3f56f",
   "metadata": {},
   "source": [
    "## Рабочий пример"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ef24b74e",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-17T16:38:41.480267Z",
     "iopub.status.busy": "2026-08-17T16:38:41.480163Z",
     "iopub.status.idle": "2026-08-17T16:38:41.505289Z",
     "shell.execute_reply": "2026-08-17T16:38:41.504745Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Средний балл: 81.5\n",
      "Максимум: 95\n",
      "Минимум: 58\n",
      "Отличников: 2\n"
     ]
    }
   ],
   "source": [
    "students = [\n",
    "    {\"name\": \"Anna\", \"score\": 95},\n",
    "    {\"name\": \"Bob\", \"score\": 82},\n",
    "    {\"name\": \"Maria\", \"score\": 91},\n",
    "    {\"name\": \"Leo\", \"score\": 58},\n",
    "]\n",
    "\n",
    "scores = [student[\"score\"] for student in students]\n",
    "average = sum(scores) / len(scores)\n",
    "maksimum = max(scores)\n",
    "minimum = min(scores)\n",
    "otlichniki = [s for s in students if s[\"score\"] >= 90]\n",
    "\n",
    "print(f\"Средний балл: {average:.1f}\")\n",
    "print(\"Максимум:\", maksimum)\n",
    "print(\"Минимум:\", minimum)\n",
    "print(\"Отличников:\", len(otlichniki))"
   ]
  }
 ],
 "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
}
