\documentclass{jsarticle}
\usepackage{pythontex}
\begin{document}
\begin{pycode}
def fibn(n):
if n < 3:
return 1
else:
return fibn(n-2) + fibn(n-1)
\end{pycode}
フィボナッチ数列 1, 1, 2, 3, 5, \ldots\ の10番目は\py{fibn(10)}である。
\end{document}
これを実行すると
フィボナッチ数列 1, 1, 2, 3, 5, \ldots\ の10番目は??である。
となる。
jupyter Notebookで
pip install pygments行って無事に入れたが何故か?