# Oppgave 3: Terningkast (variabel med tilfeldig tall)

### Program

{% embed url="<https://makecode.microbit.org/_eCF2XgTkKCjW>" %}
Terningkast
{% endembed %}

* Start med å opprette variabelen "terningkast" under menypunktet "Variabler" (trykk på "Lag en variabel..."
* Hent blokken "sett terningkast til 0" under menypunktet "Variabler"
* Blokken "velg tilfeldig ..." hentes under menypunktet "Matematikk" og legges inn i blokken "sett terningkast til". Endre start og sluttverdier som visst over.
* Blokken "vis tall 0" finner du under "Basis"

### Prøv selv

1. Prøv programmet og se at du kan få alle tallene på en terning
2. Noter resultatene av kastene og tell opp, se om du får de ulike terningkastene nogenlunde like ofte.


---

# Agent Instructions: 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:

```
GET https://oppgaver.n00b.no/micro-bit/kom-i-gang-med-micro-bit/oppgave-3-terningkast-variabel-med-tilfeldig-tall.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
