# Your first program in Python

Code App comes with many built-in languages including C++, Python and others. To see the full list, click the link below:

{% content-ref url="/pages/ZeA0iprHgpsHZ3uPtyZM" %}
[Supported Languages](/extras/supported-languages.md)
{% endcontent-ref %}

### A Hello World program in Python

Let's start by creating a Python source file. Expand the file explorer side bar and select the new file icon (document with a plus icon). You can either use the built in template or enter a custom file name to create an empty file.

For now, let's use the built in template.

![Creating a new file](/files/PGGEeW00fEE81ji92Lyn)

You should now see the hello world program written in Python. Tap the play button to run it.&#x20;

![Runing a Hello World program in Python](/files/bJQw7EAAatTLxu21ZM3L)

Congratulations! You now ran your first program on Code App.

### Python - Installing a third party module

Third party modules allow you to do awesome things, including making network requests to a web server, drawing charts to analysis data, or downloading a YouTube video.&#x20;

Code App comes with the `pip` command in the terminal. To install a modules, just type `pip install <module name>` in the terminal.

{% hint style="info" %}
Note that not all modules work on Code App, see the [FAQ](/extras/frequently-asked-questions.md#my-favourite-npm-python-module-doesnt-work) for more.
{% endhint %}

In this example, we will try out the `requests` module. It allows Python to make network requests to web servers. Let's try to get the list of people currently in the space.

Tap on the chevron button to bring up the terminal and type `pip install requests` in the terminal.

![Installing requests](/files/BFoNHH3CEqBG1Y7SKGnd)

Copy the following code to your source file and click run:

```python
import requests

res = requests.get('http://api.open-notify.org/astros.json')
print(res.text)
```

![Getting the list of all astronauts on ISS](/files/ld1phOAHw5bdQZJyfi56)

Cool! You now have the list of all astronauts currently on their mission in the space.&#x20;


---

# 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://code.thebaselab.com/guides/your-first-program-in-python.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.
