A really simple example:
hey = "hello world", 38+4 print(hey)
More complicated examples:
x = [1,1] for i in range(10): x.append(x[-1] + x[-2]) print(', '.join(str(y) for y in x))
%matplotlib inline import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 3*np.pi, 500) plt.plot(x, np.sin(x**2)) plt.title('A simple chirp');
There are still more complicated examples in the examples directory but you'll need to run a notebook server with the appropriate dependencies installed for them to work.
An example of code that is not executable
print("Na, you cannot run this sorry")
An example of code that is read only but executable
print("Nope, you can't edit this sorry! But you can run it.")
Mathjax support built in:
\begin{align} \dot{x} & = \sigma(y-x) \ \dot{y} & = \rho x - y - xz \ \dot{z} & = -\beta z + xy \end{align}