# Math

<table><thead><tr><th width="376" align="center">Block</th><th width="249" align="center">Function</th><th align="center">Output</th></tr></thead><tbody><tr><td align="center"><img src="/files/WNj4X30XGsXVJqT5ku2R" alt="" data-size="line"></td><td align="center">Basic Number Input</td><td align="center">0</td></tr><tr><td align="center"><img src="/files/BpODNDVxfV6E8UhqYuSY" alt="" data-size="original"></td><td align="center">Basic math functions (Sum, difference, , product ,quotient, power)</td><td align="center">2</td></tr><tr><td align="center"><img src="/files/PAdl19JO3SOOU6r3FHiK" alt=""></td><td align="center">More Functions (square root, absolute, negation, logarithm, base10 logarithm, euler number, 10 on power of..) </td><td align="center">3</td></tr><tr><td align="center"><img src="/files/guGW92Ak0EJb8Bv8dIb0" alt="" data-size="original"></td><td align="center">Functions (sin, cos, tan, asin, acos, atan)</td><td align="center"><strong>0,707</strong></td></tr><tr><td align="center"><img src="/files/Cp4CzTGdAiMF6DV5Nt1I" alt="" data-size="original"></td><td align="center">Constants ( π, e, Φ, sqrt(2),  sqrt(1/2), infinity)</td><td align="center">2.71828</td></tr><tr><td align="center"><img src="/files/gX8DsgeusNWgALdYWX8z" alt=""></td><td align="center">Check if number is even, odd, prime, whole, positive or negative or divisible by x</td><td align="center">True</td></tr><tr><td align="center"><img src="/files/oLM5eGjUFAeCNOtOGWIX" alt=""></td><td align="center">Round a number</td><td align="center">3</td></tr><tr><td align="center"><img src="/files/FKieqb35aoE7Fa5CtX1l" alt=""></td><td align="center">Sum, minimal, maximal, average, median, modes, standart deviation, random item</td><td align="center">6</td></tr><tr><td align="center"><img src="/files/Gc9JnSpuhPEipBmNMmR9" alt=""></td><td align="center">remainder from dividing</td><td align="center">4</td></tr><tr><td align="center"><img src="/files/tBFlrqmNTAEInB4jQCU1" alt=""></td><td align="center">Constrain a number to be between the specified limits</td><td align="center">50</td></tr><tr><td align="center"><img src="/files/vmo0rnR0c6diMZDHT6Ah" alt=""></td><td align="center">Return a random number that is whole</td><td align="center">(1 - 100)</td></tr><tr><td align="center"><img src="/files/6Yi632zOGuOAXNV8RwsE" alt=""></td><td align="center">return a random fraction  </td><td align="center">&#x3C;0,0 - 1,0)</td></tr></tbody></table>

## Examples

<figure><img src="/files/W6UseGh4ePYj1AhtnyjC" alt=""><figcaption><p>Making percentages using math blocks<br></p></figcaption></figure>

<figure><img src="/files/oMmRXI9LgtlBYdbENerv" alt=""><figcaption><p>You must have at least some luck to do something</p></figcaption></figure>


---

# 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://docs.scratch-for-discord.com/use/toolbox/basic/math.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.
