Introduction

This document contains material used in teaching Python to few middle school students.

In order to follow along, you need access to Python. One option is to use Python that is available on your computer (it usually comes preinstalled on Linux and perhaps even Mac) or install it yourself. But there is another far easier option which is handy if you only have access to Chromebook (as most middle school students do these days). That option is to use Python in the cloud and in particular this one:

The service supports free accounts which should be sufficient for the most part.

Quickstart guide for “pythonanywhere”

  • Create an account. You can start with “free” tier.
  • Go to “Dashboard”.

The easiest way to explore is to use “consoles” by clicking on >>> Python and selecting a version. For the purpose of this course, we will use version “3.6”.

For writing code in a file, click on Files from the main page and you will see how to open a new file. Do remember to name your files with “.py” extension. This will give you syntax highlighting. The script file can be run by clicking on >>> Run.

Finally, there is a more advanced option that you will need to use once you start writing more complicated scripts. From the dashboard, click on $ Bash. This will open a bash console where you can edit and run scripts directly. More information about this option will be provided later.

Resources

Main web page for Python: https://www.python.org/

Python tutorial: https://docs.python.org/3/tutorial/index.html

Documentation for Python 3: https://docs.python.org/3/