{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "3c475047",
   "metadata": {},
   "source": [
    "# 06-13 · Цвет, толщина и внешний вид\n",
    "\n",
    "Практика к разделу [«Цвет, толщина и внешний вид»](../../site/chapters/glava-06/06-13-cvet-tolschina-vid.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b9180504",
   "metadata": {},
   "source": [
    "## Цель\n",
    "\n",
    "Освоить pensize(), pencolor(), shape() и bgcolor()."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f88a3dc7",
   "metadata": {},
   "source": [
    "## Настройка (выполнить один раз)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d012561e",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:16.664980Z",
     "iopub.status.busy": "2026-08-16T13:58:16.664866Z",
     "iopub.status.idle": "2026-08-16T13:58:16.840437Z",
     "shell.execute_reply": "2026-08-16T13:58:16.839875Z"
    }
   },
   "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": "7847e72e",
   "metadata": {},
   "source": [
    "## Рабочий пример\n",
    "\n",
    "Толстая синяя линия."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "5e68aa8c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:16.841644Z",
     "iopub.status.busy": "2026-08-16T13:58:16.841503Z",
     "iopub.status.idle": "2026-08-16T13:58:17.066556Z",
     "shell.execute_reply": "2026-08-16T13:58:17.066090Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.reset()\n",
    "artist.pensize(10)\n",
    "artist.pencolor(\"#2563EB\")\n",
    "artist.forward(200)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ffc6acad",
   "metadata": {},
   "source": [
    "## Эксперимент 1\n",
    "\n",
    "Поменяйте форму курсора на черепаху и цвет фона окна."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "0bc067af",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:17.067666Z",
     "iopub.status.busy": "2026-08-16T13:58:17.067559Z",
     "iopub.status.idle": "2026-08-16T13:58:17.217976Z",
     "shell.execute_reply": "2026-08-16T13:58:17.217458Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.shape(\"turtle\")\n",
    "screen.bgcolor(\"#FAFAFC\")\n",
    "artist.reset()\n",
    "artist.pensize(3)\n",
    "artist.pencolor(\"#5B24F9\")\n",
    "artist.forward(100)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "97a6f0e8",
   "metadata": {},
   "source": [
    "## Задание ★ Базовая практика\n",
    "\n",
    "Нарисуйте линию толщиной 5 и цветом \"green\", длиной 150 пикселей."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8d18f6c3",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:17.219059Z",
     "iopub.status.busy": "2026-08-16T13:58:17.218939Z",
     "iopub.status.idle": "2026-08-16T13:58:17.410205Z",
     "shell.execute_reply": "2026-08-16T13:58:17.409494Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.shape(\"classic\")\n",
    "artist.reset()\n",
    "artist.pensize(5)\n",
    "artist.pencolor(\"green\")\n",
    "artist.forward(150)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "337eefeb",
   "metadata": {},
   "source": [
    "## Завершение (выполнить один раз, в самом конце)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "b535f3cd",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:17.411751Z",
     "iopub.status.busy": "2026-08-16T13:58:17.411553Z",
     "iopub.status.idle": "2026-08-16T13:58:17.414950Z",
     "shell.execute_reply": "2026-08-16T13:58:17.414473Z"
    }
   },
   "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
}
