> 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-2.1-pygame-quiz/les-7.md).

# Les 7

## Slides

[Module PyGame Quiz, les 7](https://slides.com/felienne/python-klas-2-module-1-les-7)

## Leerdoelen

* Begin maken met functies: Code herbruiken op een nette manier

## Instructies voor de leerkracht

In deze les maken we weer een stap voorwaarts, leerlingen gaan werken aa het toevoegen van een tweede vraag aan hun code. Sommige leerlingen zullen dat trouwens al wel geprobeerd hebben. Maar, knippen en plakken is niet handig, dan wordt code lang en onoverzichtelijk. In deze les maken we een eerste stap richting functies.

Omdat functies vrij lastig zijn, oefenen we dat los van PyGame. Dat voegen we later natuurlijk weer in de quiz in.

## Eindprogramma

Op het einde van de les zouden leerlingen ongeveer [dit programma](https://repl.it/@mevrHermans/Pidk-M4-L7a-Einde) moeten hebben.&#x20;


---

# 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-2.1-pygame-quiz/les-7.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.
