Skip to main content

Python

Pickcode's Python projects use Python 3.11.

Pre-installed libraries

  • All Python standard libraries, including time, random, sys, math, and others
  • string-color, for outputting strings in color easily
  • matplotlib, for creating charts
  • pandas, for doing data science calculations
  • numpy, for scientific computing

Any pre-installed library can be used via an import statement in code without any additional steps required.

Project types

Console

Console projects allow for printing output and prompting the user with the input function. Matplotlib charts are also displayed in the output for Console programs.

Console programs can read files via the open function (for example, a CSV file), and can write to files. When a file is written to, the user is prompted in the Console to download the contents of the new file.

Chat

Chat projects are a library we provide for displaying output of functions in message bubbles, similar to what you'd see in a phone's texting app.

Chat programs must import the chat library by adding from pickcode import chat at the beginning of main.py.

Here is an example program that demonstrates all of the functions that are available in the chat library

name = chat.ask("What's your name?")
chat.send("Hello, " + name + "!")
age = chat.askForNumber("How old are you?")
chat.send(str(age) + " is a great age!")
favorite = chat.multipleChoice("What's your favorite color?", ["red", "yellow", "green", "blue", "purple"])
chat.send("I like " + favorite + " too!")

Graphics

Note: Graphics projects are only available with a paid Classroom plan.

Graphics projects allow for displaying an output screen for Python programs.

Graphics projects come with the following libraries pre-installed:

  • turtle: For making simple drawings and animations
  • pygame: For making 2D games
  • tkinter: For creating simple graphical applications