# text()

## Description

The text function draws a text on the canvas at the specified location. The object drawn on the canvas is a shape that has an internal region which can be colored with `fill()` and a boundary which can be colored by `stroke()`.

```
text(sentence, x, y)
```

<table><thead><tr><th width="132">Input</th><th>Description</th></tr></thead><tbody><tr><td>sentence</td><td>The content of the text. It can be any type of data, though we usually use strings.</td></tr><tr><td>x</td><td>the x-coordinate of the text box</td></tr><tr><td>y</td><td>the y-coordinate of the text box</td></tr></tbody></table>

## Examples

```python
    text("Hello, Strive!", 15, 25)
    text('This\'s been\n running for' , 15, 50)
    
    fill(255)
    text(f'{round(millis()/1000)} seconds', 15, 85)
```

<figure><img src="https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2F5kmYi4uZff64qNtfeBOe%2Ftext().gif?alt=media&#x26;token=7a286419-086c-4212-8ea3-b49b2896d341" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
