{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "13f6e62a",
   "metadata": {},
   "source": [
    "# 07-01 · Konfigurujemy ekran i grafikę\n",
    "\n",
    "Praktyka do sekcji [\"Dostosuj ekran\"](.. /.. /site/chapters/glava-07/07-01-nastraivaem-ekran.html) oraz [\"Dostosowanie grafiki\"](.. /.. /site/chapters/glava-07/07-02-nastraivaem-grafiku.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "db409f4c",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Ustawić płótno i żółwia: nagłówek, tło, prędkość, grubość i kolor linii."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c611d482",
   "metadata": {},
   "source": [
    "## Ustawienie (wykonać raz)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "6fe981f1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:53:18.686180Z",
     "iopub.status.busy": "2026-08-14T20:53:18.686070Z",
     "iopub.status.idle": "2026-08-14T20:53:18.860876Z",
     "shell.execute_reply": "2026-08-14T20:53:18.860420Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Окно Turtle готово.\n"
     ]
    }
   ],
   "source": [
    "import turtle\n",
    "\n",
    "screen = turtle.Screen()\n",
    "artist = turtle.Turtle()\n",
    "artist.speed(0)\n",
    "print(\"Окно Turtle готово.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fbe1f6e2",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c32b7289",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:53:18.862088Z",
     "iopub.status.busy": "2026-08-14T20:53:18.861970Z",
     "iopub.status.idle": "2026-08-14T20:53:18.897128Z",
     "shell.execute_reply": "2026-08-14T20:53:18.896696Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Настройки применены.\n"
     ]
    }
   ],
   "source": [
    "screen.title(\"Моя первая картина\")\n",
    "screen.bgcolor(\"lightblue\")\n",
    "artist.pensize(3)\n",
    "artist.pencolor(\"purple\")\n",
    "artist.forward(100)\n",
    "print(\"Настройки применены.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4e87e4fd",
   "metadata": {},
   "source": [
    "## Eksperyment 1\n",
    "\n",
    "Wypróbuj swój ulubiony kolor tła i linii."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "404042e4",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:53:18.898272Z",
     "iopub.status.busy": "2026-08-14T20:53:18.898151Z",
     "iopub.status.idle": "2026-08-14T20:53:19.026826Z",
     "shell.execute_reply": "2026-08-14T20:53:19.026267Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Готово.\n"
     ]
    }
   ],
   "source": [
    "artist.reset()\n",
    "screen.bgcolor(\"black\")\n",
    "artist.pencolor(\"yellow\")\n",
    "artist.forward(100)\n",
    "print(\"Готово.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "acc15bf5",
   "metadata": {},
   "source": [
    "## Eksperyment 2\n",
    "\n",
    "Zmień prędkość na 1 (wolno) i 0 (natychmiastowe) – porównaj różnicę, jeśli działasz lokalnie z rzeczywistym oknem."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "e6815a21",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:53:19.028167Z",
     "iopub.status.busy": "2026-08-14T20:53:19.028049Z",
     "iopub.status.idle": "2026-08-14T20:53:19.320424Z",
     "shell.execute_reply": "2026-08-14T20:53:19.320043Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Скорость 1 — медленно.\n"
     ]
    }
   ],
   "source": [
    "artist.reset()\n",
    "artist.speed(1)\n",
    "artist.forward(80)\n",
    "print(\"Скорость 1 — медленно.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "85f1224c",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Narysuj kwadrat grubą (5px) czerwoną linią na żółtym tle."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "7b8cea0c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:53:19.321608Z",
     "iopub.status.busy": "2026-08-14T20:53:19.321501Z",
     "iopub.status.idle": "2026-08-14T20:53:20.239371Z",
     "shell.execute_reply": "2026-08-14T20:53:20.238875Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Готово.\n"
     ]
    }
   ],
   "source": [
    "artist.reset()\n",
    "screen.bgcolor(\"yellow\")\n",
    "artist.pensize(5)\n",
    "artist.pencolor(\"red\")\n",
    "for _ in range(4):\n",
    "    artist.forward(100)\n",
    "    artist.right(90)\n",
    "print(\"Готово.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "62e52540",
   "metadata": {},
   "source": [
    "## Ukończenie (wykonaj raz, na samym końcu)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "717a2fa5",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-14T20:53:20.240361Z",
     "iopub.status.busy": "2026-08-14T20:53:20.240250Z",
     "iopub.status.idle": "2026-08-14T20:53:20.243810Z",
     "shell.execute_reply": "2026-08-14T20:53:20.243402Z"
    }
   },
   "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
}
