Code App
  • Code App Documentation
  • Guides
    • Getting familiar
    • Your first program in Python
    • Creating a Node.js project
    • Version Control
    • Connecting to a remote server (SSH/FTP)
  • Extras
    • Building Code from source
    • Frequently Asked Questions
    • Supported Languages
Powered by GitBook
On this page
  • A Hello World program in Python
  • Python - Installing a third party module
  1. Guides

Your first program in Python

Learn to write Python script and install third party packages using pip.

PreviousGetting familiarNextCreating a Node.js project

Last updated 11 months ago

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

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.

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

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.

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.

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)

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

Note that not all modules work on Code App, see the for more.

Supported Languages
FAQ
Creating a new file
Runing a Hello World program in Python
Installing requests
Getting the list of all astronauts on ISS