In [1]:
print ("Hello world")
In [2]:
x = 1 + 1
print x
x
Variables created in one cell can be used in another
In [ ]:
y = x + 1
print y
Cells must be run in order for this to work
In [ ]:
a = 1
In [ ]:
b = a + 1
b
Each cell can be code, markdown https://en.wikipedia.org/wiki/Markdown
Markdown can be used to add documentation to a notebook.
To change the cell type to markdown Ctrl-m m or click into the cell and select Markdown using the dropdown that defaults to code