{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "7a54a998",
   "metadata": {},
   "source": [
    "# 07-12 · speed, tracer i update\n",
    "\n",
    "Praktyka do sekcji [„speed, tracer i update”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "097f00b3",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Opanować rysowanie wsadowe przez tracer(0) + update()."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "27967474",
   "metadata": {},
   "source": [
    "## Ustawienie (wykonać raz)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ad1c07ca",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T15:16:39.510463Z",
     "iopub.status.busy": "2026-08-16T15:16:39.510322Z",
     "iopub.status.idle": "2026-08-16T15:16:39.685310Z",
     "shell.execute_reply": "2026-08-16T15:16:39.684905Z"
    }
   },
   "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": "e4ae5cf7",
   "metadata": {},
   "source": [
    "## Sprawa robocza\n",
    "\n",
    "narysowanych 20 kółek natychmiast."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "a1c44bc6",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T15:16:39.686314Z",
     "iopub.status.busy": "2026-08-16T15:16:39.686208Z",
     "iopub.status.idle": "2026-08-16T15:16:39.713811Z",
     "shell.execute_reply": "2026-08-16T15:16:39.713323Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.reset()\n",
    "screen.tracer(0)\n",
    "for i in range(20):\n",
    "    artist.circle(60)\n",
    "    artist.right(18)\n",
    "screen.update()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b2a0efdc",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Używając tracer(0) i update(), narysuj 24 okręgi o promieniu 50, każdy obrócony o 15°."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "19fdf29c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T15:16:39.714864Z",
     "iopub.status.busy": "2026-08-16T15:16:39.714758Z",
     "iopub.status.idle": "2026-08-16T15:16:39.722288Z",
     "shell.execute_reply": "2026-08-16T15:16:39.721822Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.reset()\n",
    "screen.tracer(0)\n",
    "for i in range(24):\n",
    "    artist.circle(50)\n",
    "    artist.right(15)\n",
    "screen.update()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a5728618",
   "metadata": {},
   "source": [
    "## Ukończenie (wykonaj raz, na samym końcu)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "c151739a",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T15:16:39.723596Z",
     "iopub.status.busy": "2026-08-16T15:16:39.723469Z",
     "iopub.status.idle": "2026-08-16T15:16:39.726436Z",
     "shell.execute_reply": "2026-08-16T15:16:39.725984Z"
    }
   },
   "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
}
