{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "16648156",
   "metadata": {},
   "source": [
    "# 13-01 · Первая функция\n",
    "\n",
    "Практика к разделу [«Настоящая автоматизация»](../../site/chapters/glava-13/13-01-nastoyashaya-avtomatizaciya.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a55e34db",
   "metadata": {},
   "source": [
    "## Цель\n",
    "\n",
    "Определить и вызвать первую функцию."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c66fc37b",
   "metadata": {},
   "source": [
    "## Рабочий пример"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "bed904d4",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:58:35.294428Z",
     "iopub.status.busy": "2026-08-14T20:58:35.294271Z",
     "iopub.status.idle": "2026-08-14T20:58:35.313544Z",
     "shell.execute_reply": "2026-08-14T20:58:35.313070Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Привет, Python!\n",
      "Привет, Python!\n",
      "Привет, Python!\n"
     ]
    }
   ],
   "source": [
    "def privetstvie():\n",
    "    print(\"Привет, Python!\")\n",
    "\n",
    "privetstvie()\n",
    "privetstvie()\n",
    "privetstvie()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "80734362",
   "metadata": {},
   "source": [
    "## Эксперимент 1\n",
    "\n",
    "Определите функцию, не вызывая её, — убедитесь, что ничего не выводится."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "537496cd",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:58:35.314532Z",
     "iopub.status.busy": "2026-08-14T20:58:35.314407Z",
     "iopub.status.idle": "2026-08-14T20:58:35.316751Z",
     "shell.execute_reply": "2026-08-14T20:58:35.316291Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Программа выполнилась, а функция — нет.\n"
     ]
    }
   ],
   "source": [
    "def nichego_ne_delaet():\n",
    "    print(\"Меня никто не вызвал!\")\n",
    "\n",
    "print(\"Программа выполнилась, а функция — нет.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b6b3d708",
   "metadata": {},
   "source": [
    "## Задание ★ Базовая практика\n",
    "\n",
    "Напишите функцию `poprisdachu()`, которая выводит короткое прощание, и вызовите её три раза."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "04dcc9a6",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:58:35.317676Z",
     "iopub.status.busy": "2026-08-14T20:58:35.317558Z",
     "iopub.status.idle": "2026-08-14T20:58:35.319820Z",
     "shell.execute_reply": "2026-08-14T20:58:35.319352Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "До встречи!\n",
      "До встречи!\n",
      "До встречи!\n"
     ]
    }
   ],
   "source": [
    "def poproshchatsya():\n",
    "    print(\"До встречи!\")\n",
    "\n",
    "poproshchatsya()\n",
    "poproshchatsya()\n",
    "poproshchatsya()"
   ]
  }
 ],
 "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
}
