{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "23188e1c",
   "metadata": {},
   "source": [
    "# 07-13 · Геометрия окружности\n",
    "\n",
    "Практика к разделу [«Геометрия окружности»](../../site/chapters/glava-07/07-13-geometriya-okruzhnosti.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ceb0c042",
   "metadata": {},
   "source": [
    "## Цель\n",
    "\n",
    "Понять направление рисования circle() и роль знака радиуса."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cfa3c374",
   "metadata": {},
   "source": [
    "## Настройка (выполнить один раз)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d266db07",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T15:16:40.493011Z",
     "iopub.status.busy": "2026-08-16T15:16:40.492898Z",
     "iopub.status.idle": "2026-08-16T15:16:40.678305Z",
     "shell.execute_reply": "2026-08-16T15:16:40.677759Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Окно Turtle готово.\n"
     ]
    }
   ],
   "source": [
    "import turtle\n",
    "\n",
    "screen = turtle.Screen()\n",
    "artist = turtle.Turtle()\n",
    "artist.pensize(3)\n",
    "artist.pencolor(\"#5B24F9\")\n",
    "print(\"Окно Turtle готово.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5209e650",
   "metadata": {},
   "source": [
    "## Рабочий пример\n",
    "\n",
    "Положительный и отрицательный радиус рядом."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "7ef5c40d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T15:16:40.679250Z",
     "iopub.status.busy": "2026-08-16T15:16:40.679142Z",
     "iopub.status.idle": "2026-08-16T15:16:43.383151Z",
     "shell.execute_reply": "2026-08-16T15:16:43.382536Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.reset()\n",
    "artist.circle(70)\n",
    "artist.penup(); artist.forward(180); artist.pendown()\n",
    "artist.circle(-70)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f7d9fa63",
   "metadata": {},
   "source": [
    "## Задание ★ Базовая практика\n",
    "\n",
    "Нарисуйте окружность радиусом 90 по часовой стрелке (используйте отрицательный радиус)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b4e9b2e1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T15:16:43.384454Z",
     "iopub.status.busy": "2026-08-16T15:16:43.384336Z",
     "iopub.status.idle": "2026-08-16T15:16:44.862308Z",
     "shell.execute_reply": "2026-08-16T15:16:44.861736Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.reset()\n",
    "artist.circle(-90)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "193bd123",
   "metadata": {},
   "source": [
    "## Завершение (выполнить один раз, в самом конце)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8d361ae0",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T15:16:44.863350Z",
     "iopub.status.busy": "2026-08-16T15:16:44.863239Z",
     "iopub.status.idle": "2026-08-16T15:16:44.866146Z",
     "shell.execute_reply": "2026-08-16T15:16:44.865688Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Окно Turtle закрыто.\n"
     ]
    }
   ],
   "source": [
    "screen.bye()\n",
    "print(\"Окно Turtle закрыто.\")"
   ]
  }
 ],
 "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
}
