> For the complete documentation index, see [llms.txt](https://felienne.gitbook.io/codasium/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://felienne.gitbook.io/codasium/module-4.1-tkinter/les-2/les-2b.md).

# Les 2b

**1) Maak een nieuw programma op replit**

Maak een vers programma op replit en zet er deze code in:

```python
from tkinter import *

root = Tk()

root.title("Mijn woordenoefenapp")
root.geometry("600x400")
```

Test je code uit en kijk of je weer een mooie UI in beeld krijgt.

**2) Maak drie knoppen**

In je oefenapp had je, als het goed is, die verschillende *modi* (het meervoud van modus):

1. Woorden selecteren om te oefenen met de functie `selecteren()`
2. Woorden oefenen met de functie `oefenen()`
3. Een print maken van jouw woordenkennis met de functie `uitvoer_tonen()`

Maak nu drie knoppen en zet daar op:

1. Selecteren
2. Oefenen
3. Uitvoer tonen

Weet je niet meer hoe je knoppen maakt? Spiek bij jouw code van vorige week.&#x20;

Hier zijn belangrijke tips!!

* Iedere knop moet een eigen variabele worden! (bijv: `knop1` en `knop2` of, nog beter: `selecteerknop` en `oefenknop`)
* `.place(x=0, y=120)` geeft de (x,y) coördinaat van de knop aan
* Iedere knop moet op een andere plaats komen
* Je hoeft nog geen codes te koppelen aan de knoppen. Dus `["command"]`mag je nog even weglaten

Test nu je code en kijk of het er goed uit ziet.

**3) Maak  een uitvoerveld en twee knoppen**

We hebben ook weer uitvoer nodig om het woord te laten zien, en twee knoppen met Ja en Nee erop. Daarmee gaat de gebruiker aangeven of ze het woord al kennen. Voeg die ook toe aan je programma, zodat het er zo uit ziet:

<figure><img src="/files/2DV4F8eiBB9oMCOj4hae" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://felienne.gitbook.io/codasium/module-4.1-tkinter/les-2/les-2b.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
