
\begin{verbatim}
print(123)
\end{verbatim}
\begin{verbatim}
123
\end{verbatim}


\begin{verbatim}
a = 42
print(a)
\end{verbatim}
\begin{verbatim}
42
\end{verbatim}

Test output.

\begin{verbatim}
2 + 2 * 2 ** 2
\end{verbatim}
\begin{verbatim}
10
\end{verbatim}


\begin{verbatim}
for i in range(3):
    print(i)
\end{verbatim}
\begin{verbatim}
0
1
2
\end{verbatim}


\begin{verbatim}
for i in range(3):
    print(i)
    print(i**2)
\end{verbatim}
\begin{verbatim}
0
0
1
1
2
4
\end{verbatim}

This code does not work as expected
\begin{verbatim}
for i in range(3):
    print(i)

    print(i**2)
\end{verbatim}


\begin{verbatim}
>>> for i in range(3):
...     print(i)
...
...     print(i**2)
...
0
0
1
1
2
4

\end{verbatim}


\begin{verbatim}
for i in range(3):
    print(i)
\end{verbatim}
\begin{verbatim}
0
1
2
\end{verbatim}

\begin{verbatim}
print(1 + 2)
\end{verbatim}
\begin{verbatim}
3
\end{verbatim}


\begin{verbatim}
for i in range(2):
    print(i)
    if i > 0:
        print("one")
\end{verbatim}
\begin{verbatim}
0
1
one
\end{verbatim}


\begin{verbatim}
for i in range(3):
    print(i)
    if i == 1:
        raise Exception("foo")
\end{verbatim}
\begin{verbatim}
0
1
\end{verbatim}
\begin{verbatim}
---------------------------------------------------------------------------Exception
Traceback (most recent call last)<ipython-input-19-b0fb8d925930> in
<module>()
      2     print(i)
      3     if i == 1:
----> 4         raise Exception("foo")
      5
Exception: foo
\end{verbatim}

\begin{verbatim}
print(42)
\end{verbatim}
\begin{verbatim}
42
\end{verbatim}


\begin{verbatim}
def f
\end{verbatim}
\begin{verbatim}
File "<ipython-input-22-b5657d2747d4>", line 1
    def f
         ^
SyntaxError: invalid syntax
\end{verbatim}

\begin{verbatim}
print(42)
\end{verbatim}
\begin{verbatim}
42
\end{verbatim}


\begin{verbatim}
def f():
    print(12)
  print(8)
print(42)
\end{verbatim}
\begin{verbatim}
File "<ipython-input-25-9e9734f26d6a>", line 3
    print(8)
            ^
IndentationError: unindent does not match any outer indentation level
\end{verbatim}

Empty code chunk does not work

\begin{verbatim}
>>>

\end{verbatim}

End

