Normally, Jupyter notebook only displays the last output of the cell; all others are ignored unless you use the print() function (for Python 3).
Jupyter only displays the following as the output:
3, the output for 1+2 gets totally ignored. The simple hack below will fix this.
from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = "all"
Basically, put the code above in the beginning of your notebook and voilà, all the output is printed.