Converted notebooks to scripts for problems 16-18