Mastering API Design at Scale¶

Welcome to the Mastering API Design at Scale course! Author: roberto.polli@par-tec.it


Introducing Python¶

Python is an interpreted, object oriented language with a lot of built in features. It can be used as a calculator and for mathematical operations, such as statistics, plotting and linear algebra.

This is a fast-track course for high school students with math knowledge.

Students are expected to type and execute cells, and share their results.

:warning: While you can open this notebook on jupyter lite, the rest of this course requires a full Jupyter environment.


Jupyter¶

Is the course environment in your browser. It requires a modern browser and an internet connection supporting websockets. If your network setup (e.g. your proxy) does not support websockets, you will not be able to execute the code.


While you might find the exercises' solutions in the environment, it is important for you to spend some time trying to do your homework! This will help you to remember the concepts and to learn how to use the tools.


What can I do with Jupyter?¶

You can:

  • execute the next cell with SHIFT+ENTER (try it now!)

If your environment supports it, you can use features requiring operating system access:

  • open a (named) terminal on the local machine
  • edit an existing file

  • add more cells with ALT+ENTER

Try to add a cell below this one and write some text in it.

In [ ]:
# Add a new python cell with ALT+ENTER.

Python terminal¶

With Jupyter, you have a Python terminal at your disposal. You can run Python code:

In [ ]:
# You can evaluate maths and strings
s = 1
print("a string and the number " + str(s))

Jupyter remembers the variables you define in a cell, so you can use them in the next cells.

In [ ]:
# Evaluate this cell with SHIFT+ENTER
s = s + 1
print("now s is increased " + str(s))

Since Jupyter remembers the variables, you can run the cells in any order you want. This means that sometimes, you need to "reset" the environment, to start from scratch.

This can be done with the "Kernel > Restart" or "Kernel > Restart & Clear output" menu.