Your first program in Python
Learn to write Python script and install third party packages using pip.
Code App comes with many built-in languages including C++, Python and others. To see the full list, click the link below:
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
You should now see the hello world program written in Python. Tap the play button to run it.

Runing a Hello World program in Python
Congratulations! You now ran your first program on Code App.
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.
Code App comes with the
pip
command in the terminal. To install a modules, just type pip install <module name>
in the terminal.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
Copy the following code to your source file and click run:
import requests
res = requests.get('http://api.open-notify.org/astros.json')
print(res.text)

Getting the list of all astronauts on ISS
Cool! You now have the list of all astronauts currently on their mission in the space.
Last modified 26d ago