Skip to content

Problem Solving 101 with Python Book Construction

Problem Solving 101 with Python Book Construction

Jupyter Notebooks

Problem Solving 101 with Python was written in jupyter notebooks on a variety of computers. The GitHub repo for the Jupyter notebooks that make up the book can be found at:

https://github.com/ProfessorKazarinoff/Problem-Solving-101-with-Python The directory structure of the GitHub repo contains the jupyter notebooks that were use the write the book, a set of conversion tools, and the files used to build the book website. The conversion tools allow the same source notebooks to be converted into three formats: LaTeX, website, and PDF.

Problem-Solving-101-with-Python/
|-- conversion_tools/
|-- notebooks/
|-- website/
|-- .gitignore
|-- LICENSE
|-- README.md
|-- runtime.txt/
|-- requirements.txt

The notebooks directory contains a folder for each chapter of the book:

notebooks/
|-- 00-Preface/
|-- 01-What-is-Python/
|-- 02-Installing-Python/
|-- 03-Jupyter-Notebooks/
|-- 04-The-Python-REPL/
|-- 05-Plotting-with-Matplotlib/
|-- 06-User-Input-and-Loops/
|-- 99-Appendix/
|-- figures/
`-- TOC.ipynb

Within each chapter directory, there is a jupyter notebook for each section and an images directory for any images used in the markdown sections of the notebooks.

01-What-is-Python/
|-- 01.00-Introduction.ipynb
|-- 01.01-What-is-Python.ipynb
|-- 01.02-Why-Python.ipynb
|-- 01.03-What-is-Anaconda.ipynb
|-- 01.04-Summary.ipynb
|-- 01.05-Review-Questions.ipynb
`-- images/

Website

The website for the book was constructed using mkdocs https://www.mkdocs.org/ and the mkdocs-material theme https://squidfunk.github.io/mkdocs-material/.

Jupyter noteboks were exported to html with the markdown cells unformatted using nbconvert. A custom script constructed the mkdocs.yml file which contains the table of contents for the website. The static files produced by mkdocs are hosted on GitHub Pages (https://pages.github.com/)

Hardcopy

The hard copy of the book was constructed using LaTeX and nbconvert. A conversion script combined all of the notebooks into one BIG notebook. The conversion script then converted the one BIG combined notebook to LaTeX using a nbconvert and a custom template. TeXworks was used to compile the LaTeX to PDF prior to printing.