{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "57062d91",
   "metadata": {},
   "source": [
    "# 06-09 · Współrzędne: środek (0, 0)\n",
    "\n",
    "Praktyka do sekcji [„Koordynaty: centrum (0, 0)”](/pl/chapters/rozdzial-06/06-09-koordinaty.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "301cae16",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Opanować układ współrzędnych okna Turtle oraz polecenie goto()."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e3bed3fb",
   "metadata": {},
   "source": [
    "## Ustawienie (wykonać raz)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "0786e2f8",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:05.825985Z",
     "iopub.status.busy": "2026-08-16T13:58:05.825856Z",
     "iopub.status.idle": "2026-08-16T13:58:06.029428Z",
     "shell.execute_reply": "2026-08-16T13:58:06.028795Z"
    }
   },
   "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": "1cefcd88",
   "metadata": {},
   "source": [
    "## Sprawa robocza\n",
    "\n",
    "Przesuń się do czterech różnych punktów, oznaczając każdy kropką."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "32f504f9",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:06.031312Z",
     "iopub.status.busy": "2026-08-16T13:58:06.031097Z",
     "iopub.status.idle": "2026-08-16T13:58:06.943994Z",
     "shell.execute_reply": "2026-08-16T13:58:06.943413Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.reset()\n",
    "artist.penup()\n",
    "for x, y in [(100, 0), (-100, 0), (0, 100), (0, -100)]:\n",
    "    artist.goto(x, y)\n",
    "    artist.dot(12, \"#5B24F9\")\n",
    "artist.goto(0, 0)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "26146ba5",
   "metadata": {},
   "source": [
    "## Eksperyment 1\n",
    "\n",
    "Przewidź, w której ćwierci ekranu znajde się kropka (-150, -100) przed wyzwalaniem."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4ed88d05",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:06.945623Z",
     "iopub.status.busy": "2026-08-16T13:58:06.945433Z",
     "iopub.status.idle": "2026-08-16T13:58:07.201104Z",
     "shell.execute_reply": "2026-08-16T13:58:07.200592Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.reset()\n",
    "artist.penup()\n",
    "artist.goto(-150, -100)\n",
    "artist.dot(14, \"#DB2777\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cf352b57",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Umieść kropki w trzech wierzchołkach trójkąta: (0, 100), (-100, -100), (100, -100)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "17774e9f",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:07.202397Z",
     "iopub.status.busy": "2026-08-16T13:58:07.202294Z",
     "iopub.status.idle": "2026-08-16T13:58:07.863687Z",
     "shell.execute_reply": "2026-08-16T13:58:07.863317Z"
    }
   },
   "outputs": [],
   "source": [
    "artist.reset()\n",
    "artist.penup()\n",
    "for x, y in [(0, 100), (-100, -100), (100, -100)]:\n",
    "    artist.goto(x, y)\n",
    "    artist.dot(12, \"#5B24F9\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "47e5aa16",
   "metadata": {},
   "source": [
    "## Ukończenie (wykonaj raz, na samym końcu)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3424691e",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T13:58:07.865034Z",
     "iopub.status.busy": "2026-08-16T13:58:07.864925Z",
     "iopub.status.idle": "2026-08-16T13:58:07.867682Z",
     "shell.execute_reply": "2026-08-16T13:58:07.867250Z"
    }
   },
   "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
}
