Notebook example

example of python notebook

Before you start

You can choose to render a document in multiple formats (see </> Code on the top right).

For instance, this file is rendered both in html and ipynb.

So now, you can download your file notebook.ipynb and then load it on Jupyter.

Python cells

A python cell that will not be executed

import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm

x = np.linspace(-3, 3, 1000)

pdf = norm.pdf(x, 0, 1)
plt.plot(x, pdf, label='Normal Distribution')
plt.show()

A python cell to be executed if eval: true

import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm

x = np.linspace(-3, 3, 1000)

pdf = norm.pdf(x, 0, 1)
plt.plot(x, pdf, label='Normal Distribution')
plt.show()