diff --git a/book/gallery/chapters/ap-01-jupyter-as-your-editor/figures/1302-installing_jupyter.png b/book/gallery/chapters/ap-01-jupyter-as-your-editor/figures/1302-installing_jupyter.png new file mode 100644 index 0000000..e785970 Binary files /dev/null and b/book/gallery/chapters/ap-01-jupyter-as-your-editor/figures/1302-installing_jupyter.png differ diff --git a/book/gallery/chapters/ap-01-jupyter-as-your-editor/figures/1302-starting_jupyter.jpg b/book/gallery/chapters/ap-01-jupyter-as-your-editor/figures/1302-starting_jupyter.jpg new file mode 100644 index 0000000..10fed22 Binary files /dev/null and b/book/gallery/chapters/ap-01-jupyter-as-your-editor/figures/1302-starting_jupyter.jpg differ diff --git a/book/gallery/chapters/ap-01-jupyter-as-your-editor/readme.md b/book/gallery/chapters/ap-01-jupyter-as-your-editor/readme.md new file mode 100644 index 0000000..e2cfc73 --- /dev/null +++ b/book/gallery/chapters/ap-01-jupyter-as-your-editor/readme.md @@ -0,0 +1,13 @@ +# Gallery: Appendix 01 - Jupyter as Your Editor + +[![Install JupyterLab with `pip install jupyterlab` in a venv or account-wide](figures/1302-installing_jupyter.png)](figures/1302-installing_jupyter.png) +Figure 1: [Install JupyterLab with `pip install jupyterlab` in a venv or account-wide](figures/1302-installing_jupyter.png) + + +[![Starting the Jupyter server with `jupyter lab` command](figures/1302-starting_jupyter.jpg)](figures/1302-starting_jupyter.jpg) +Figure 2: [Starting the Jupyter server with `jupyter lab` command](figures/1302-starting_jupyter.jpg) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0102-hero.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0102-hero.png new file mode 100644 index 0000000..c28d402 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0102-hero.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0102-superhero.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0102-superhero.png new file mode 100644 index 0000000..a9b487b Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0102-superhero.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-graph.jpg b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-graph.jpg new file mode 100644 index 0000000..fdf9f33 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-graph.jpg differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-graph_2.jpg b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-graph_2.jpg new file mode 100644 index 0000000..5442394 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-graph_2.jpg differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-hero.jpg b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-hero.jpg new file mode 100644 index 0000000..4e85448 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0103-hero.jpg differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger.png new file mode 100644 index 0000000..9657fbc Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger_2.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger_2.png new file mode 100644 index 0000000..f3dd056 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger_2.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger_3.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger_3.png new file mode 100644 index 0000000..523c539 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-debugger_3.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-error_screen.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-error_screen.png new file mode 100644 index 0000000..7e79da4 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-error_screen.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-error_screen_detail.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-error_screen_detail.png new file mode 100644 index 0000000..73470c4 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-error_screen_detail.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-google_error.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-google_error.png new file mode 100644 index 0000000..0e51f32 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-google_error.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-office_hours.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-office_hours.png new file mode 100644 index 0000000..ac89fb7 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-office_hours.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-repository.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-repository.png new file mode 100644 index 0000000..085de59 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-repository.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-repository_2.jpg b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-repository_2.jpg new file mode 100644 index 0000000..2392340 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-repository_2.jpg differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-stackoverflow.png b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-stackoverflow.png new file mode 100644 index 0000000..4eaa00a Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0106-stackoverflow.png differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0107-hero.jpg b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0107-hero.jpg new file mode 100644 index 0000000..77fb354 Binary files /dev/null and b/book/gallery/chapters/ch-01-welcome-to-the-course/figures/0107-hero.jpg differ diff --git a/book/gallery/chapters/ch-01-welcome-to-the-course/readme.md b/book/gallery/chapters/ch-01-welcome-to-the-course/readme.md new file mode 100644 index 0000000..b182c36 --- /dev/null +++ b/book/gallery/chapters/ch-01-welcome-to-the-course/readme.md @@ -0,0 +1,69 @@ +# Gallery: Chapter 01 - Welcome to the Course + +[![Should you be a programmer?](figures/0102-hero.png)](figures/0102-hero.png) +Figure 1: [Should you be a programmer?](figures/0102-hero.png) + + +[![A programming superhero](figures/0102-superhero.png)](figures/0102-superhero.png) +Figure 2: [A programming superhero](figures/0102-superhero.png) + + +[![Python is Eating the World article](figures/0103-hero.jpg)](figures/0103-hero.jpg) +Figure 3: [Python is Eating the World article](figures/0103-hero.jpg) + + +[![Stack Overflow Trends showing Python's growth](figures/0103-graph.jpg)](figures/0103-graph.jpg) +Figure 4: [Stack Overflow Trends showing Python's growth](figures/0103-graph.jpg) + + +[![Stackoverflow Trends showing Python's growth (highlighted)](figures/0103-graph_2.jpg)](figures/0103-graph_2.jpg) +Figure 5: [Stackoverflow Trends showing Python's growth (highlighted)](figures/0103-graph_2.jpg) + + +[![A syntax error in a Python application](figures/0106-error_screen.png)](figures/0106-error_screen.png) +Figure 6: [A syntax error in a Python application](figures/0106-error_screen.png) + + +[![Exception details will show the direct cause at the bottom](figures/0106-error_screen_detail.png)](figures/0106-error_screen_detail.png) +Figure 7: [Exception details will show the direct cause at the bottom](figures/0106-error_screen_detail.png) + + +[![Google the error message](figures/0106-google_error.png)](figures/0106-google_error.png) +Figure 8: [Google the error message](figures/0106-google_error.png) + + +[![Check Stack Overflow for an answer](figures/0106-stackoverflow.png)](figures/0106-stackoverflow.png) +Figure 9: [Check Stack Overflow for an answer](figures/0106-stackoverflow.png) + + +[![Use a debugger (in PyCharm) to see variable values](figures/0106-debugger.png)](figures/0106-debugger.png) +Figure 10: [Use a debugger (in PyCharm) to see variable values](figures/0106-debugger.png) + + +[![Value of variables in the editor (grey text)](figures/0106-debugger_2.png)](figures/0106-debugger_2.png) +Figure 11: [Value of variables in the editor (grey text)](figures/0106-debugger_2.png) + + +[![Value of variables in the watch window](figures/0106-debugger_3.png)](figures/0106-debugger_3.png) +Figure 12: [Value of variables in the watch window](figures/0106-debugger_3.png) + + +[![Check the course's GitHub repository](figures/0106-repository.png)](figures/0106-repository.png) +Figure 13: [Check the course's GitHub repository](figures/0106-repository.png) + + +[![Focus on the issues (there may be closed ones too)](figures/0106-repository_2.jpg)](figures/0106-repository_2.jpg) +Figure 14: [Focus on the issues (there may be closed ones too)](figures/0106-repository_2.jpg) + + +[![Join the live Office Hours at Talk Python](figures/0106-office_hours.png)](figures/0106-office_hours.png) +Figure 15: [Join the live Office Hours at Talk Python](figures/0106-office_hours.png) + + +[![Michael Kennedy: Host @ Talk Python and Python Bytes, Founder Talk Python Training](figures/0107-hero.jpg)](figures/0107-hero.jpg) +Figure 16: [Michael Kennedy: Host @ Talk Python and Python Bytes, Founder Talk Python Training](figures/0107-hero.jpg) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-download_python.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-download_python.png new file mode 100644 index 0000000..2e56beb Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-download_python.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-python_version.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-python_version.png new file mode 100644 index 0000000..31f9766 Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-python_version.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-terminal.jpg b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-terminal.jpg new file mode 100644 index 0000000..9d7ab3f Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-terminal.jpg differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-terminal_2.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-terminal_2.png new file mode 100644 index 0000000..7796738 Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0201-terminal_2.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-python3.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-python3.png new file mode 100644 index 0000000..51f20af Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-python3.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-terminal.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-terminal.png new file mode 100644 index 0000000..6c36674 Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-terminal.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-where_python.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-where_python.png new file mode 100644 index 0000000..343107b Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-where_python.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-where_python3.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-where_python3.png new file mode 100644 index 0000000..d8e38de Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-where_python3.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-windows_store.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-windows_store.png new file mode 100644 index 0000000..d95ed4f Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0202-windows_store.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0203-install-python.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0203-install-python.png new file mode 100644 index 0000000..e0d4277 Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0203-install-python.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-code_editor_level_1.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-code_editor_level_1.png new file mode 100644 index 0000000..80e90bc Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-code_editor_level_1.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-code_editor_level_2.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-code_editor_level_2.png new file mode 100644 index 0000000..3d7f845 Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-code_editor_level_2.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-jetbrains_toolbox.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-jetbrains_toolbox.png new file mode 100644 index 0000000..67e662d Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-jetbrains_toolbox.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-jupyter_notebook.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-jupyter_notebook.png new file mode 100644 index 0000000..c4b12f5 Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-jupyter_notebook.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-vscode.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-vscode.png new file mode 100644 index 0000000..6ec4886 Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0204-vscode.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0205-download_repo.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0205-download_repo.png new file mode 100644 index 0000000..7bcc6da Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0205-download_repo.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0205-github_repo.png b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0205-github_repo.png new file mode 100644 index 0000000..764837b Binary files /dev/null and b/book/gallery/chapters/ch-02-course-setup-and-requirements/figures/0205-github_repo.png differ diff --git a/book/gallery/chapters/ch-02-course-setup-and-requirements/readme.md b/book/gallery/chapters/ch-02-course-setup-and-requirements/readme.md new file mode 100644 index 0000000..6368857 --- /dev/null +++ b/book/gallery/chapters/ch-02-course-setup-and-requirements/readme.md @@ -0,0 +1,73 @@ +# Gallery: Chapter 02 - Course Setup and Requirements + +[![Download Python for your OS at python.org](figures/0201-download_python.png)](figures/0201-download_python.png) +Figure 1: [Download Python for your OS at python.org](figures/0201-download_python.png) + + +[![Launch **Terminal** on macOS with Spotlight (CMD+Space)](figures/0201-terminal.jpg)](figures/0201-terminal.jpg) +Figure 2: [Launch **Terminal** on macOS with Spotlight (CMD+Space)](figures/0201-terminal.jpg) + + +[![Launch **Terminal** on macOS via **Finder**](figures/0201-terminal_2.png)](figures/0201-terminal_2.png) +Figure 3: [Launch **Terminal** on macOS via **Finder**](figures/0201-terminal_2.png) + + +[![Check your Python version on macOS and Linux](figures/0201-python_version.png)](figures/0201-python_version.png) +Figure 4: [Check your Python version on macOS and Linux](figures/0201-python_version.png) + + +[![Check your Python version on Windows](figures/0202-terminal.png)](figures/0202-terminal.png) +Figure 5: [Check your Python version on Windows](figures/0202-terminal.png) + + +[![Python3 might be the Windows Store shim](figures/0202-python3.png)](figures/0202-python3.png) +Figure 6: [Python3 might be the Windows Store shim](figures/0202-python3.png) + + +[![Python 3 in the Windows Store](figures/0202-windows_store.png)](figures/0202-windows_store.png) +Figure 7: [Python 3 in the Windows Store](figures/0202-windows_store.png) + + +[![Using the `where python` command to explore Windows path](figures/0202-where_python.png)](figures/0202-where_python.png) +Figure 8: [Using the `where python` command to explore Windows path](figures/0202-where_python.png) + + +[![Using the `where python3` command to explore Windows path](figures/0202-where_python3.png)](figures/0202-where_python3.png) +Figure 9: [Using the `where python3` command to explore Windows path](figures/0202-where_python3.png) + + +[![Python installation guide at Talk Python Training](figures/0203-install-python.png)](figures/0203-install-python.png) +Figure 10: [Python installation guide at Talk Python Training](figures/0203-install-python.png) + + +[![Code Editor Level 1: The Python REPL](figures/0204-code_editor_level_1.png)](figures/0204-code_editor_level_1.png) +Figure 11: [Code Editor Level 1: The Python REPL](figures/0204-code_editor_level_1.png) + + +[![Code Editor Level 2: Install PyCharm](figures/0204-code_editor_level_2.png)](figures/0204-code_editor_level_2.png) +Figure 12: [Code Editor Level 2: Install PyCharm](figures/0204-code_editor_level_2.png) + + +[![Manage PyCharm and other tools using JetBrains Toolbox](figures/0204-jetbrains_toolbox.png)](figures/0204-jetbrains_toolbox.png) +Figure 13: [Manage PyCharm and other tools using JetBrains Toolbox](figures/0204-jetbrains_toolbox.png) + + +[![Visual Studio Code is a solid other choice for our projects](figures/0204-vscode.png)](figures/0204-vscode.png) +Figure 14: [Visual Studio Code is a solid other choice for our projects](figures/0204-vscode.png) + + +[![JupyterLab can be used as an editor for most projects](figures/0204-jupyter_notebook.png)](figures/0204-jupyter_notebook.png) +Figure 15: [JupyterLab can be used as an editor for most projects](figures/0204-jupyter_notebook.png) + + +[![The Github repository for code from the course](figures/0205-github_repo.png)](figures/0205-github_repo.png) +Figure 16: [The Github repository for code from the course](figures/0205-github_repo.png) + + +[![Code can be downloaded without git (green button then download)](figures/0205-download_repo.png)](figures/0205-download_repo.png) +Figure 17: [Code can be downloaded without git (green button then download)](figures/0205-download_repo.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0302-webapp.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0302-webapp.png new file mode 100644 index 0000000..169df0b Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0302-webapp.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0304-code_execution.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0304-code_execution.png new file mode 100644 index 0000000..5341a21 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0304-code_execution.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_1.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_1.png new file mode 100644 index 0000000..edd6cef Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_1.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_2.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_2.png new file mode 100644 index 0000000..268fd9a Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_2.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_3.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_3.png new file mode 100644 index 0000000..f689be0 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_3.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_4.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_4.png new file mode 100644 index 0000000..e59f37e Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_4.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_5.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_5.png new file mode 100644 index 0000000..c1bb513 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_5.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_6.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_6.png new file mode 100644 index 0000000..bdc1e8d Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_6.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_7.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_7.png new file mode 100644 index 0000000..a8b7d1b Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_7.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_8.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_8.png new file mode 100644 index 0000000..667219f Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_8.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_9.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_9.png new file mode 100644 index 0000000..d8a4e73 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0305-code_execution_9.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0306-byte_code.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0306-byte_code.png new file mode 100644 index 0000000..eb63531 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0306-byte_code.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0307-algorithm.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0307-algorithm.png new file mode 100644 index 0000000..d081199 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0307-algorithm.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0308-guess_1.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0308-guess_1.png new file mode 100644 index 0000000..174b537 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0308-guess_1.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0308-guess_2.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0308-guess_2.png new file mode 100644 index 0000000..cbc21db Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0308-guess_2.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0309-binary_search.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0309-binary_search.png new file mode 100644 index 0000000..3118b70 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0309-binary_search.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0310-pros_vs_beginners.jpg b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0310-pros_vs_beginners.jpg new file mode 100644 index 0000000..3b08b81 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0310-pros_vs_beginners.jpg differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0311-podcast.png b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0311-podcast.png new file mode 100644 index 0000000..f82bde3 Binary files /dev/null and b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/figures/0311-podcast.png differ diff --git a/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/readme.md b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/readme.md new file mode 100644 index 0000000..ae2f696 --- /dev/null +++ b/book/gallery/chapters/ch-03-the-big-ideas-of-software-development/readme.md @@ -0,0 +1,77 @@ +# Gallery: Chapter 03 - The Big Ideas of Software Development + +[![Source code is used to make decisions about how data is displayed](figures/0302-webapp.png)](figures/0302-webapp.png) +Figure 1: [Source code is used to make decisions about how data is displayed](figures/0302-webapp.png) + + +[![Example of source code executing (as a Python app)](figures/0304-code_execution.png)](figures/0304-code_execution.png) +Figure 2: [Example of source code executing (as a Python app)](figures/0304-code_execution.png) + + +[![Code Execution: Start with Python source code](figures/0305-code_execution_1.png)](figures/0305-code_execution_1.png) +Figure 3: [Code Execution: Start with Python source code](figures/0305-code_execution_1.png) + + +[![Code Execution: Python converts this to Python Byte Code](figures/0305-code_execution_2.png)](figures/0305-code_execution_2.png) +Figure 4: [Code Execution: Python converts this to Python Byte Code](figures/0305-code_execution_2.png) + + +[![Code Execution: Byte code is cached for reuse](figures/0305-code_execution_3.png)](figures/0305-code_execution_3.png) +Figure 5: [Code Execution: Byte code is cached for reuse](figures/0305-code_execution_3.png) + + +[![Code Execution: Byte code is passed to the Python runtime](figures/0305-code_execution_4.png)](figures/0305-code_execution_4.png) +Figure 6: [Code Execution: Byte code is passed to the Python runtime](figures/0305-code_execution_4.png) + + +[![Code Execution: Python's interpret loop processes the byte code](figures/0305-code_execution_5.png)](figures/0305-code_execution_5.png) +Figure 7: [Code Execution: Python's interpret loop processes the byte code](figures/0305-code_execution_5.png) + + +[![Code Execution: Python interprets the byte code one by one](figures/0305-code_execution_9.png)](figures/0305-code_execution_9.png) +Figure 8: [Code Execution: Python interprets the byte code one by one](figures/0305-code_execution_9.png) + + +[![Code Execution: Byte code contains comamands (a file operation)](figures/0305-code_execution_6.png)](figures/0305-code_execution_6.png) +Figure 9: [Code Execution: Byte code contains comamands (a file operation)](figures/0305-code_execution_6.png) + + +[![Code Execution: Byte code contains comamands (reading from RAM)](figures/0305-code_execution_7.png)](figures/0305-code_execution_7.png) +Figure 10: [Code Execution: Byte code contains comamands (reading from RAM)](figures/0305-code_execution_7.png) + + +[![Code Execution: The runtime manages memory usage for us](figures/0305-code_execution_8.png)](figures/0305-code_execution_8.png) +Figure 11: [Code Execution: The runtime manages memory usage for us](figures/0305-code_execution_8.png) + + +[![Code Execution: Example of raw Python byte code](figures/0306-byte_code.png)](figures/0306-byte_code.png) +Figure 12: [Code Execution: Example of raw Python byte code](figures/0306-byte_code.png) + + +[![Algorithms are just structured decisions and actions](figures/0307-algorithm.png)](figures/0307-algorithm.png) +Figure 13: [Algorithms are just structured decisions and actions](figures/0307-algorithm.png) + + +[![The first part of our guessing algorithm](figures/0308-guess_1.png)](figures/0308-guess_1.png) +Figure 14: [The first part of our guessing algorithm](figures/0308-guess_1.png) + + +[![Our guessing algorithm wins us a free lunch](figures/0308-guess_2.png)](figures/0308-guess_2.png) +Figure 15: [Our guessing algorithm wins us a free lunch](figures/0308-guess_2.png) + + +[![Binary search algorithm](figures/0309-binary_search.png)](figures/0309-binary_search.png) +Figure 16: [Binary search algorithm](figures/0309-binary_search.png) + + +[![Many similarities and differences between pros and beginners](figures/0310-pros_vs_beginners.jpg)](figures/0310-pros_vs_beginners.jpg) +Figure 17: [Many similarities and differences between pros and beginners](figures/0310-pros_vs_beginners.jpg) + + +[![The beginners and experts episode on Talk Python To Me](figures/0311-podcast.png)](figures/0311-podcast.png) +Figure 18: [The beginners and experts episode on Talk Python To Me](figures/0311-podcast.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0401-repl_1.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0401-repl_1.png new file mode 100644 index 0000000..23cca0c Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0401-repl_1.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0401-repl_2.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0401-repl_2.png new file mode 100644 index 0000000..a7f37a8 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0401-repl_2.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-python2.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-python2.png new file mode 100644 index 0000000..39103f6 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-python2.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-python3.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-python3.png new file mode 100644 index 0000000..71bcd11 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-python3.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-terminal.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-terminal.png new file mode 100644 index 0000000..7796738 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0402-terminal.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-cmd.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-cmd.png new file mode 100644 index 0000000..066d1ce Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-cmd.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-hello_world.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-hello_world.png new file mode 100644 index 0000000..4ee341e Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-hello_world.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-python.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-python.png new file mode 100644 index 0000000..f2233bc Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-python.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-where_python.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-where_python.png new file mode 100644 index 0000000..a475dac Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0403-where_python.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor.png new file mode 100644 index 0000000..06e8f73 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_execution.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_execution.png new file mode 100644 index 0000000..be06f4f Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_execution.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_setting.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_setting.png new file mode 100644 index 0000000..375ba3c Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_setting.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_1.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_1.png new file mode 100644 index 0000000..2b2ff7b Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_1.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_2.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_2.png new file mode 100644 index 0000000..b77ca1a Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_2.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_3.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_3.png new file mode 100644 index 0000000..cb1b0b5 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_3.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_4.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_4.png new file mode 100644 index 0000000..fcf3830 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0407-python_tutor_step_4.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list.png new file mode 100644 index 0000000..1072599 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_2.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_2.png new file mode 100644 index 0000000..3c76485 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_2.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_3.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_3.png new file mode 100644 index 0000000..0acb8f3 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_3.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_4.png b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_4.png new file mode 100644 index 0000000..4180535 Binary files /dev/null and b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/figures/0408-python_tutor_list_4.png differ diff --git a/book/gallery/chapters/ch-04-writing-your-first-line-of-code/readme.md b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/readme.md new file mode 100644 index 0000000..9274cab --- /dev/null +++ b/book/gallery/chapters/ch-04-writing-your-first-line-of-code/readme.md @@ -0,0 +1,85 @@ +# Gallery: Chapter 04 - Writing your first line of code + +[![*Hello world* in the macOS REPL](figures/0401-repl_1.png)](figures/0401-repl_1.png) +Figure 1: [*Hello world* in the macOS REPL](figures/0401-repl_1.png) + + +[![Windows REPL](figures/0401-repl_2.png)](figures/0401-repl_2.png) +Figure 2: [Windows REPL](figures/0401-repl_2.png) + + +[![Launching Terminal in macOS via Applications folder](figures/0402-terminal.png)](figures/0402-terminal.png) +Figure 3: [Launching Terminal in macOS via Applications folder](figures/0402-terminal.png) + + +[![Warning: `python` on macOS/Linux might mean Python 2](figures/0402-python2.png)](figures/0402-python2.png) +Figure 4: [Warning: `python` on macOS/Linux might mean Python 2](figures/0402-python2.png) + + +[![When in doubt, use the `python3` command on macOS / Linux](figures/0402-python3.png)](figures/0402-python3.png) +Figure 5: [When in doubt, use the `python3` command on macOS / Linux](figures/0402-python3.png) + + +[![Launching Windows Terminal via the Start Menu on Windows 11](figures/0403-cmd.png)](figures/0403-cmd.png) +Figure 6: [Launching Windows Terminal via the Start Menu on Windows 11](figures/0403-cmd.png) + + +[![`python` on Windows usually means Python 3](figures/0403-python.png)](figures/0403-python.png) +Figure 7: [`python` on Windows usually means Python 3](figures/0403-python.png) + + +[![Using the `where python` command to explore the Python and installed versions](figures/0403-where_python.png)](figures/0403-where_python.png) +Figure 8: [Using the `where python` command to explore the Python and installed versions](figures/0403-where_python.png) + + +[![Python 3.10 is first in the path, so `python` runs that one](figures/0403-hello_world.png)](figures/0403-hello_world.png) +Figure 9: [Python 3.10 is first in the path, so `python` runs that one](figures/0403-hello_world.png) + + +[![PythonTutor.com has useful visualization tools for Python code](figures/0407-python_tutor.png)](figures/0407-python_tutor.png) +Figure 10: [PythonTutor.com has useful visualization tools for Python code](figures/0407-python_tutor.png) + + +[![Be sure to select "render all objects on heap" to replicate](figures/0407-python_tutor_setting.png)](figures/0407-python_tutor_setting.png) +Figure 11: [Be sure to select "render all objects on heap" to replicate](figures/0407-python_tutor_setting.png) + + +[![Step 1: No code has executed yet](figures/0407-python_tutor_execution.png)](figures/0407-python_tutor_execution.png) +Figure 12: [Step 1: No code has executed yet](figures/0407-python_tutor_execution.png) + + +[![Step 2: A single variable `person1` has been created](figures/0407-python_tutor_step_1.png)](figures/0407-python_tutor_step_1.png) +Figure 13: [Step 2: A single variable `person1` has been created](figures/0407-python_tutor_step_1.png) + + +[![Step 3&4: New value `"Michael" shared by `person2` and `friend`](figures/0407-python_tutor_step_2.png)](figures/0407-python_tutor_step_2.png) +Figure 14: [Step 3&4: New value `"Michael" shared by `person2` and `friend`](figures/0407-python_tutor_step_2.png) + + +[![Step 5: people list created holding (shared) values of person 1 and 2](figures/0407-python_tutor_step_3.png)](figures/0407-python_tutor_step_3.png) +Figure 15: [Step 5: people list created holding (shared) values of person 1 and 2](figures/0407-python_tutor_step_3.png) + + +[![Step 6: An independent new value is assigned to `person3`](figures/0407-python_tutor_step_4.png)](figures/0407-python_tutor_step_4.png) +Figure 16: [Step 6: An independent new value is assigned to `person3`](figures/0407-python_tutor_step_4.png) + + +[![Visualize a list pointing to held objects](figures/0408-python_tutor_list.png)](figures/0408-python_tutor_list.png) +Figure 17: [Visualize a list pointing to held objects](figures/0408-python_tutor_list.png) + + +[![Sharing the list across variables shares the same data structure](figures/0408-python_tutor_list_2.png)](figures/0408-python_tutor_list_2.png) +Figure 18: [Sharing the list across variables shares the same data structure](figures/0408-python_tutor_list_2.png) + + +[![The list before sorting](figures/0408-python_tutor_list_3.png)](figures/0408-python_tutor_list_3.png) +Figure 19: [The list before sorting](figures/0408-python_tutor_list_3.png) + + +[![After sorting, both `the_data` and `other_data` are updated](figures/0408-python_tutor_list_4.png)](figures/0408-python_tutor_list_4.png) +Figure 20: [After sorting, both `the_data` and `other_data` are updated](figures/0408-python_tutor_list_4.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_1.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_1.png new file mode 100644 index 0000000..f9e8938 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_1.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_2.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_2.png new file mode 100644 index 0000000..e12284d Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_2.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_3.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_3.png new file mode 100644 index 0000000..2b176d5 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_3.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_4.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_4.png new file mode 100644 index 0000000..02f43aa Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_4.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_5.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_5.png new file mode 100644 index 0000000..cc60ba8 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_5.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_6.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_6.png new file mode 100644 index 0000000..af448ea Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_6.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_7.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_7.png new file mode 100644 index 0000000..f87e9fb Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0503-pycharm_7.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-dropdown.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-dropdown.png new file mode 100644 index 0000000..a7d8f6a Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-dropdown.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-dropdown_2.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-dropdown_2.png new file mode 100644 index 0000000..7051d5b Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-dropdown_2.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-parameters_message.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-parameters_message.png new file mode 100644 index 0000000..9761b42 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0504-parameters_message.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-dropdown.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-dropdown.png new file mode 100644 index 0000000..2336c53 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-dropdown.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-github_1.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-github_1.png new file mode 100644 index 0000000..9bc5017 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-github_1.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-github_history.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-github_history.png new file mode 100644 index 0000000..3d75ecf Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0505-github_history.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_2.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_2.png new file mode 100644 index 0000000..5162ec3 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_2.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_3.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_3.png new file mode 100644 index 0000000..67a068f Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_3.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_4.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_4.png new file mode 100644 index 0000000..0064752 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_4.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_5.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_5.png new file mode 100644 index 0000000..285475d Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_5.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_6.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_6.png new file mode 100644 index 0000000..f874b3d Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_6.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_8.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_8.png new file mode 100644 index 0000000..077d2ec Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-Debug_8.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug.png new file mode 100644 index 0000000..3b5b79c Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug_10.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug_10.png new file mode 100644 index 0000000..3d6ccb0 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug_10.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug_9.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug_9.png new file mode 100644 index 0000000..38ba0d3 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0508-debug_9.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0509-code.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0509-code.png new file mode 100644 index 0000000..09ba959 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0509-code.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0510-truthiness.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0510-truthiness.png new file mode 100644 index 0000000..04dc939 Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0510-truthiness.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0511-multiple_conditions.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0511-multiple_conditions.png new file mode 100644 index 0000000..ba1febd Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0511-multiple_conditions.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0512-github_repo.png b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0512-github_repo.png new file mode 100644 index 0000000..229bcbb Binary files /dev/null and b/book/gallery/chapters/ch-05-code-that-interacts-with-users/figures/0512-github_repo.png differ diff --git a/book/gallery/chapters/ch-05-code-that-interacts-with-users/readme.md b/book/gallery/chapters/ch-05-code-that-interacts-with-users/readme.md new file mode 100644 index 0000000..dc8f037 --- /dev/null +++ b/book/gallery/chapters/ch-05-code-that-interacts-with-users/readme.md @@ -0,0 +1,109 @@ +# Gallery: Chapter 05 - Code that interacts with users + +[![Creating a new Python project using PyCharm (type selection)](figures/0503-pycharm_1.png)](figures/0503-pycharm_1.png) +Figure 1: [Creating a new Python project using PyCharm (type selection)](figures/0503-pycharm_1.png) + + +[![Creating a new Python project using PyCharm (settings)](figures/0503-pycharm_2.png)](figures/0503-pycharm_2.png) +Figure 2: [Creating a new Python project using PyCharm (settings)](figures/0503-pycharm_2.png) + + +[![PyCharm with our brand new (empty) project loaded](figures/0503-pycharm_3.png)](figures/0503-pycharm_3.png) +Figure 3: [PyCharm with our brand new (empty) project loaded](figures/0503-pycharm_3.png) + + +[![Beginnings of our `print` line](figures/0503-pycharm_4.png)](figures/0503-pycharm_4.png) +Figure 4: [Beginnings of our `print` line](figures/0503-pycharm_4.png) + + +[![PEP8 error: no newline at end of file](figures/0503-pycharm_5.png)](figures/0503-pycharm_5.png) +Figure 5: [PEP8 error: no newline at end of file](figures/0503-pycharm_5.png) + + +[![Running our simple Python file](figures/0503-pycharm_6.png)](figures/0503-pycharm_6.png) +Figure 6: [Running our simple Python file](figures/0503-pycharm_6.png) + + +[![Output of our program in the PyCharm run window](figures/0503-pycharm_7.png)](figures/0503-pycharm_7.png) +Figure 7: [Output of our program in the PyCharm run window](figures/0503-pycharm_7.png) + + +[![PyCharm's autocomplete helps us write our import statements](figures/0504-dropdown.png)](figures/0504-dropdown.png) +Figure 8: [PyCharm's autocomplete helps us write our import statements](figures/0504-dropdown.png) + + +[![PyCharm also autocompletes symbols in the editor](figures/0504-dropdown_2.png)](figures/0504-dropdown_2.png) +Figure 9: [PyCharm also autocompletes symbols in the editor](figures/0504-dropdown_2.png) + + +[![PyCharm will show which parameters are needed in a function call](figures/0504-parameters_message.png)](figures/0504-parameters_message.png) +Figure 10: [PyCharm will show which parameters are needed in a function call](figures/0504-parameters_message.png) + + +[![Our recent changes are commited in GitHub](figures/0505-github_1.png)](figures/0505-github_1.png) +Figure 11: [Our recent changes are commited in GitHub](figures/0505-github_1.png) + + +[![GitHub (via git) has great support for history of changes in our code](figures/0505-github_history.png)](figures/0505-github_history.png) +Figure 12: [GitHub (via git) has great support for history of changes in our code](figures/0505-github_history.png) + + +[![PyCharm supports matching by starting characters](figures/0505-dropdown.png)](figures/0505-dropdown.png) +Figure 13: [PyCharm supports matching by starting characters](figures/0505-dropdown.png) + + +[![The "launch in debugger" button in PyCharm](figures/0508-debug.png)](figures/0508-debug.png) +Figure 14: [The "launch in debugger" button in PyCharm](figures/0508-debug.png) + + +[![Debug > Step Over](figures/0508-Debug_2.png)](figures/0508-Debug_2.png) +Figure 15: [Debug > Step Over](figures/0508-Debug_2.png) + + +[![Seeing variable values in the debugger](figures/0508-Debug_3.png)](figures/0508-Debug_3.png) +Figure 16: [Seeing variable values in the debugger](figures/0508-Debug_3.png) + + +[![Modifying the value while paused in the debugger](figures/0508-Debug_4.png)](figures/0508-Debug_4.png) +Figure 17: [Modifying the value while paused in the debugger](figures/0508-Debug_4.png) + + +[![Debug: First iteration in the `while` loop](figures/0508-Debug_5.png)](figures/0508-Debug_5.png) +Figure 18: [Debug: First iteration in the `while` loop](figures/0508-Debug_5.png) + + +[![We could win because we saw the answer in the deubbger, but we'll play](figures/0508-Debug_6.png)](figures/0508-Debug_6.png) +Figure 19: [We could win because we saw the answer in the deubbger, but we'll play](figures/0508-Debug_6.png) + + +[![That guess was too low](figures/0508-Debug_8.png)](figures/0508-Debug_8.png) +Figure 20: [That guess was too low](figures/0508-Debug_8.png) + + +[![Changed values are shown in **orange** in the editor](figures/0508-debug_9.png)](figures/0508-debug_9.png) +Figure 21: [Changed values are shown in **orange** in the editor](figures/0508-debug_9.png) + + +[![Debugging ends when the process exits (Debug > Console window)](figures/0508-debug_10.png)](figures/0508-debug_10.png) +Figure 22: [Debugging ends when the process exits (Debug > Console window)](figures/0508-debug_10.png) + + +[![Example of a simple conditional statement in Python](figures/0509-code.png)](figures/0509-code.png) +Figure 23: [Example of a simple conditional statement in Python](figures/0509-code.png) + + +[![The exhaustive list of things that evaluate to False in Python](figures/0510-truthiness.png)](figures/0510-truthiness.png) +Figure 24: [The exhaustive list of things that evaluate to False in Python](figures/0510-truthiness.png) + + +[![Multiple conditions in a single if statement](figures/0511-multiple_conditions.png)](figures/0511-multiple_conditions.png) +Figure 25: [Multiple conditions in a single if statement](figures/0511-multiple_conditions.png) + + +[![Course page provides quick access to the GitHub repository](figures/0512-github_repo.png)](figures/0512-github_repo.png) +Figure 26: [Course page provides quick access to the GitHub repository](figures/0512-github_repo.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0602-karate_kid.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0602-karate_kid.png new file mode 100644 index 0000000..7b107e9 Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0602-karate_kid.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0602-time_for_a_game.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0602-time_for_a_game.png new file mode 100644 index 0000000..6cbed05 Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0602-time_for_a_game.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0603-new_env.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0603-new_env.png new file mode 100644 index 0000000..3e74d03 Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0603-new_env.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0603-run.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0603-run.png new file mode 100644 index 0000000..1d26eea Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0603-run.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0606-main.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0606-main.png new file mode 100644 index 0000000..c0d0ad8 Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0606-main.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0607-refactor.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0607-refactor.png new file mode 100644 index 0000000..783138c Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0607-refactor.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0608-extract_method.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0608-extract_method.png new file mode 100644 index 0000000..b6bce8c Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0608-extract_method.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0608-extract_method_2.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0608-extract_method_2.png new file mode 100644 index 0000000..10735c2 Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0608-extract_method_2.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0613-practice.png b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0613-practice.png new file mode 100644 index 0000000..0d3c5f7 Binary files /dev/null and b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/figures/0613-practice.png differ diff --git a/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/readme.md b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/readme.md new file mode 100644 index 0000000..699f2f4 --- /dev/null +++ b/book/gallery/chapters/ch-06-organizing-and-reusing-code-with-functions/readme.md @@ -0,0 +1,41 @@ +# Gallery: Chapter 06 - Organizing and Reusing Code with Functions + +[![Rules of the Rock Paper Scissor game](figures/0602-time_for_a_game.png)](figures/0602-time_for_a_game.png) +Figure 1: [Rules of the Rock Paper Scissor game](figures/0602-time_for_a_game.png) + + +[![Building games teaches real programming like waxing cars was karate practice](figures/0602-karate_kid.png)](figures/0602-karate_kid.png) +Figure 2: [Building games teaches real programming like waxing cars was karate practice](figures/0602-karate_kid.png) + + +[![Creating a new virtual environment in PyCharm](figures/0603-new_env.png)](figures/0603-new_env.png) +Figure 3: [Creating a new virtual environment in PyCharm](figures/0603-new_env.png) + + +[![Create a run configuration through right-click menu](figures/0603-run.png)](figures/0603-run.png) +Figure 4: [Create a run configuration through right-click menu](figures/0603-run.png) + + +[![PyCharm offers "Live Templates", like this `main` pattern](figures/0606-main.png)](figures/0606-main.png) +Figure 5: [PyCharm offers "Live Templates", like this `main` pattern](figures/0606-main.png) + + +[![The **rename refactoring** in action](figures/0607-refactor.png)](figures/0607-refactor.png) +Figure 6: [The **rename refactoring** in action](figures/0607-refactor.png) + + +[![**Extract Method** is a powerful way to better organize and understand code](figures/0608-extract_method.png)](figures/0608-extract_method.png) +Figure 7: [**Extract Method** is a powerful way to better organize and understand code](figures/0608-extract_method.png) + + +[![Dialog for finalizing **Extract Method** refactoring](figures/0608-extract_method_2.png)](figures/0608-extract_method_2.png) +Figure 8: [Dialog for finalizing **Extract Method** refactoring](figures/0608-extract_method_2.png) + + +[![Practice execises at the course's GitHub repository](figures/0613-practice.png)](figures/0613-practice.png) +Figure 9: [Practice execises at the course's GitHub repository](figures/0613-practice.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-problems.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-problems.png new file mode 100644 index 0000000..012318a Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-problems.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-rps.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-rps.png new file mode 100644 index 0000000..49ceb9b Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-rps.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-wat.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-wat.png new file mode 100644 index 0000000..d34dd7c Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0702-wat.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0703-playground.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0703-playground.png new file mode 100644 index 0000000..35a8c51 Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0703-playground.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0704-dictionaries.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0704-dictionaries.png new file mode 100644 index 0000000..aace9e7 Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0704-dictionaries.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0705-project-rename.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0705-project-rename.png new file mode 100644 index 0000000..52fee8c Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0705-project-rename.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0705-recently_used.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0705-recently_used.png new file mode 100644 index 0000000..e52dd2c Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0705-recently_used.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0706-history.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0706-history.png new file mode 100644 index 0000000..b2d1fe3 Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0706-history.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0708-data_structure.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0708-data_structure.png new file mode 100644 index 0000000..be5afe4 Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0708-data_structure.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0710-practice.png b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0710-practice.png new file mode 100644 index 0000000..e6c2d13 Binary files /dev/null and b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/figures/0710-practice.png differ diff --git a/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/readme.md b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/readme.md new file mode 100644 index 0000000..31828aa --- /dev/null +++ b/book/gallery/chapters/ch-07-cleaner-code-with-common-data-structures/readme.md @@ -0,0 +1,45 @@ +# Gallery: Chapter 07 - Cleaner Code with Common Data Structures + +[![Our Rock Paper Scissors implementation works but ...](figures/0702-rps.png)](figures/0702-rps.png) +Figure 1: [Our Rock Paper Scissors implementation works but ...](figures/0702-rps.png) + + +[![`play_round()` works but it's not pretty](figures/0702-wat.png)](figures/0702-wat.png) +Figure 2: [`play_round()` works but it's not pretty](figures/0702-wat.png) + + +[![Reading and maintaining `play_round()` is not easy](figures/0702-problems.png)](figures/0702-problems.png) +Figure 3: [Reading and maintaining `play_round()` is not easy](figures/0702-problems.png) + + +[![Creating the playground to explore fundamental data structures](figures/0703-playground.png)](figures/0703-playground.png) +Figure 4: [Creating the playground to explore fundamental data structures](figures/0703-playground.png) + + +[![You'll find dictionaries permeating the Python ecosystem](figures/0704-dictionaries.png)](figures/0704-dictionaries.png) +Figure 5: [You'll find dictionaries permeating the Python ecosystem](figures/0704-dictionaries.png) + + +[![Folder have a non-descriptive or repeatative name? Name your project](figures/0705-project-rename.png)](figures/0705-project-rename.png) +Figure 6: [Folder have a non-descriptive or repeatative name? Name your project](figures/0705-project-rename.png) + + +[![Recently used list now shows the improved project name](figures/0705-recently_used.png)](figures/0705-recently_used.png) +Figure 7: [Recently used list now shows the improved project name](figures/0705-recently_used.png) + + +[![Local history shows you recent file system changes (unrelated to VCS)](figures/0706-history.png)](figures/0706-history.png) +Figure 8: [Local history shows you recent file system changes (unrelated to VCS)](figures/0706-history.png) + + +[![Proper data structures mean happy developers (and dogs)](figures/0708-data_structure.png)](figures/0708-data_structure.png) +Figure 9: [Proper data structures mean happy developers (and dogs)](figures/0708-data_structure.png) + + +[![Complete this code using data structures in *your turn*](figures/0710-practice.png)](figures/0710-practice.png) +Figure 10: [Complete this code using data structures in *your turn*](figures/0710-practice.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0803-tictactoe.png b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0803-tictactoe.png new file mode 100644 index 0000000..d031550 Binary files /dev/null and b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0803-tictactoe.png differ diff --git a/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0813-debugger.png b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0813-debugger.png new file mode 100644 index 0000000..cbca381 Binary files /dev/null and b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0813-debugger.png differ diff --git a/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0814-refactor.png b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0814-refactor.png new file mode 100644 index 0000000..2e04691 Binary files /dev/null and b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0814-refactor.png differ diff --git a/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0814-refactored.png b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0814-refactored.png new file mode 100644 index 0000000..ec87121 Binary files /dev/null and b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0814-refactored.png differ diff --git a/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0815-pypi.png b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0815-pypi.png new file mode 100644 index 0000000..268a738 Binary files /dev/null and b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/figures/0815-pypi.png differ diff --git a/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/readme.md b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/readme.md new file mode 100644 index 0000000..0b77064 --- /dev/null +++ b/book/gallery/chapters/ch-08-problem-solving-techniques-for-writing-software/readme.md @@ -0,0 +1,25 @@ +# Gallery: Chapter 08 - Problem-Solving Techniques for Writing Software + +[![Let's build Tic-Tac-Toe using our techniques](figures/0803-tictactoe.png)](figures/0803-tictactoe.png) +Figure 1: [Let's build Tic-Tac-Toe using our techniques](figures/0803-tictactoe.png) + + +[![The debugger is a great tool for understanding data and program flow](figures/0813-debugger.png)](figures/0813-debugger.png) +Figure 2: [The debugger is a great tool for understanding data and program flow](figures/0813-debugger.png) + + +[![Refactoring to methods helps think about code as building blocks](figures/0814-refactor.png)](figures/0814-refactor.png) +Figure 3: [Refactoring to methods helps think about code as building blocks](figures/0814-refactor.png) + + +[![A simpler view of code now that we've refactored it](figures/0814-refactored.png)](figures/0814-refactored.png) +Figure 4: [A simpler view of code now that we've refactored it](figures/0814-refactored.png) + + +[![Libraries that support *web scraping* at PyPI (over 10k)](figures/0815-pypi.png)](figures/0815-pypi.png) +Figure 5: [Libraries that support *web scraping* at PyPI (over 10k)](figures/0815-pypi.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0902-maxq.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0902-maxq.png new file mode 100644 index 0000000..615601c Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0902-maxq.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-extend.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-extend.png new file mode 100644 index 0000000..bc04a84 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-extend.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-rps.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-rps.png new file mode 100644 index 0000000..72bd2d1 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-rps.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-rps_2.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-rps_2.png new file mode 100644 index 0000000..dbdf546 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0903-rps_2.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error.jpg b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error.jpg new file mode 100644 index 0000000..cd8e435 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error.jpg differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_2.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_2.png new file mode 100644 index 0000000..a0091f2 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_2.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_3.jpg b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_3.jpg new file mode 100644 index 0000000..bd985a4 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_3.jpg differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_4.jpg b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_4.jpg new file mode 100644 index 0000000..928cabc Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_4.jpg differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_fixed.jpg b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_fixed.jpg new file mode 100644 index 0000000..302694a Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0906-directory_error_fixed.jpg differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0908-concept.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0908-concept.png new file mode 100644 index 0000000..f3249ba Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0908-concept.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0912-saving_json.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0912-saving_json.png new file mode 100644 index 0000000..f10c166 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0912-saving_json.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0913-logging.jpg b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0913-logging.jpg new file mode 100644 index 0000000..7e2c556 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0913-logging.jpg differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_app_start.jpg b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_app_start.jpg new file mode 100644 index 0000000..88c9cf1 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_app_start.jpg differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_current.jpg b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_current.jpg new file mode 100644 index 0000000..d081d0a Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_current.jpg differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_full_game.jpg b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_full_game.jpg new file mode 100644 index 0000000..04cd3a7 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0915-logging_full_game.jpg differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0916-appending.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0916-appending.png new file mode 100644 index 0000000..be4c409 Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0916-appending.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0917-logging.png b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0917-logging.png new file mode 100644 index 0000000..8efd4aa Binary files /dev/null and b/book/gallery/chapters/ch-09-reading-and-writing-files/figures/0917-logging.png differ diff --git a/book/gallery/chapters/ch-09-reading-and-writing-files/readme.md b/book/gallery/chapters/ch-09-reading-and-writing-files/readme.md new file mode 100644 index 0000000..486c9c7 --- /dev/null +++ b/book/gallery/chapters/ch-09-reading-and-writing-files/readme.md @@ -0,0 +1,73 @@ +# Gallery: Chapter 09 - Reading and Writing Files + +[![Max Q is the greatest point of resistence during a launch](figures/0902-maxq.png)](figures/0902-maxq.png) +Figure 1: [Max Q is the greatest point of resistence during a launch](figures/0902-maxq.png) + + +[![A text file that defines the rules of our game](figures/0903-extend.png)](figures/0903-extend.png) +Figure 2: [A text file that defines the rules of our game](figures/0903-extend.png) + + +[![7-way rock paper scissors](figures/0903-rps.png)](figures/0903-rps.png) +Figure 3: [7-way rock paper scissors](figures/0903-rps.png) + + +[![25-way rock paper scissors](figures/0903-rps_2.png)](figures/0903-rps_2.png) +Figure 4: [25-way rock paper scissors](figures/0903-rps_2.png) + + +[![Edit Configurations... to configure run details](figures/0906-directory_error.jpg)](figures/0906-directory_error.jpg) +Figure 5: [Edit Configurations... to configure run details](figures/0906-directory_error.jpg) + + +[![Changing the working directory has consequences (for now)](figures/0906-directory_error_2.png)](figures/0906-directory_error_2.png) +Figure 6: [Changing the working directory has consequences (for now)](figures/0906-directory_error_2.png) + + +[![`rolls.json` was not found *in the working directory*](figures/0906-directory_error_3.jpg)](figures/0906-directory_error_3.jpg) +Figure 7: [`rolls.json` was not found *in the working directory*](figures/0906-directory_error_3.jpg) + + +[![Printing the result of `os.path.dirname(__file__)`](figures/0906-directory_error_4.jpg)](figures/0906-directory_error_4.jpg) +Figure 8: [Printing the result of `os.path.dirname(__file__)`](figures/0906-directory_error_4.jpg) + + +[![Using a path based on the python file fixes the error](figures/0906-directory_error_fixed.jpg)](figures/0906-directory_error_fixed.jpg) +Figure 9: [Using a path based on the python file fixes the error](figures/0906-directory_error_fixed.jpg) + + +[![Concept example using the `json` module to load a JSON file](figures/0908-concept.png)](figures/0908-concept.png) +Figure 10: [Concept example using the `json` module to load a JSON file](figures/0908-concept.png) + + +[![The `json.dump()` method is used to write JSON files](figures/0912-saving_json.png)](figures/0912-saving_json.png) +Figure 11: [The `json.dump()` method is used to write JSON files](figures/0912-saving_json.png) + + +[![Example of log output from a *real* application](figures/0913-logging.jpg)](figures/0913-logging.jpg) +Figure 12: [Example of log output from a *real* application](figures/0913-logging.jpg) + + +[![`tail`ing the log of our RPS application](figures/0915-logging_current.jpg)](figures/0915-logging_current.jpg) +Figure 13: [`tail`ing the log of our RPS application](figures/0915-logging_current.jpg) + + +[![Seeing the log file written during start up](figures/0915-logging_app_start.jpg)](figures/0915-logging_app_start.jpg) +Figure 14: [Seeing the log file written during start up](figures/0915-logging_app_start.jpg) + + +[![Log file entries for playing an entire round](figures/0915-logging_full_game.jpg)](figures/0915-logging_full_game.jpg) +Figure 15: [Log file entries for playing an entire round](figures/0915-logging_full_game.jpg) + + +[![Use the mode `'a'` to append to an existing file](figures/0916-appending.png)](figures/0916-appending.png) +Figure 16: [Use the mode `'a'` to append to an existing file](figures/0916-appending.png) + + +[![There are many logging frameworks for Python to choose from](figures/0917-logging.png)](figures/0917-logging.png) +Figure 17: [There are many logging frameworks for Python to choose from](figures/0917-logging.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1001-antigravity.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1001-antigravity.png new file mode 100644 index 0000000..9879956 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1001-antigravity.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1002-pypi.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1002-pypi.png new file mode 100644 index 0000000..479d336 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1002-pypi.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1003-ui.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1003-ui.png new file mode 100644 index 0000000..8608661 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1003-ui.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1003-ui2.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1003-ui2.png new file mode 100644 index 0000000..a5acf3b Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1003-ui2.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-folder.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-folder.png new file mode 100644 index 0000000..55255b7 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-folder.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-venv.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-venv.png new file mode 100644 index 0000000..71f941b Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-venv.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-venv_2.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-venv_2.png new file mode 100644 index 0000000..f98896b Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1004-venv_2.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1005-pip_install.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1005-pip_install.png new file mode 100644 index 0000000..8bf1d98 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1005-pip_install.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors.png new file mode 100644 index 0000000..18175e4 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_2.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_2.png new file mode 100644 index 0000000..79debc2 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_2.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_3.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_3.png new file mode 100644 index 0000000..dab1742 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_3.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_4.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_4.png new file mode 100644 index 0000000..9eebf80 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_4.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_5.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_5.png new file mode 100644 index 0000000..0153b37 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_5.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_6.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_6.png new file mode 100644 index 0000000..3365b96 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_6.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_7.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_7.png new file mode 100644 index 0000000..0d10d9c Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1006-terminal_colors_7.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1007-autocomplete.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1007-autocomplete.png new file mode 100644 index 0000000..11ccd1a Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1007-autocomplete.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1007-error.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1007-error.png new file mode 100644 index 0000000..36eaa14 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1007-error.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1008-dropdown.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1008-dropdown.png new file mode 100644 index 0000000..3a3a735 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1008-dropdown.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1009-using_external_libraries.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1009-using_external_libraries.png new file mode 100644 index 0000000..5dcde65 Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1009-using_external_libraries.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/figures/1010-practice.png b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1010-practice.png new file mode 100644 index 0000000..c9a687f Binary files /dev/null and b/book/gallery/chapters/ch-10-using-external-python-packages/figures/1010-practice.png differ diff --git a/book/gallery/chapters/ch-10-using-external-python-packages/readme.md b/book/gallery/chapters/ch-10-using-external-python-packages/readme.md new file mode 100644 index 0000000..ba30062 --- /dev/null +++ b/book/gallery/chapters/ch-10-using-external-python-packages/readme.md @@ -0,0 +1,85 @@ +# Gallery: Chapter 10 - Using External Python Packages + +[![How are you flying? `pip install antigravity` (actually work in REPL)](figures/1001-antigravity.png)](figures/1001-antigravity.png) +Figure 1: [How are you flying? `pip install antigravity` (actually work in REPL)](figures/1001-antigravity.png) + + +[![Python Package Index - PyPi (prounced Pie-Pea-Eye)](figures/1002-pypi.png)](figures/1002-pypi.png) +Figure 2: [Python Package Index - PyPi (prounced Pie-Pea-Eye)](figures/1002-pypi.png) + + +[![A little color goes a long way to a better UI](figures/1003-ui.png)](figures/1003-ui.png) +Figure 3: [A little color goes a long way to a better UI](figures/1003-ui.png) + + +[![We can even add a dropdown/combobox like interface to rolls](figures/1003-ui2.png)](figures/1003-ui2.png) +Figure 4: [We can even add a dropdown/combobox like interface to rolls](figures/1003-ui2.png) + + +[![We will create a virtual environment in our project folder](figures/1004-folder.png)](figures/1004-folder.png) +Figure 5: [We will create a virtual environment in our project folder](figures/1004-folder.png) + + +[![Creating a virtual environment (activate with `venv/scripts/activate` in Win)](figures/1004-venv.png)](figures/1004-venv.png) +Figure 6: [Creating a virtual environment (activate with `venv/scripts/activate` in Win)](figures/1004-venv.png) + + +[![Installed packages listed in PyCharms "Python Packages" window](figures/1004-venv_2.png)](figures/1004-venv_2.png) +Figure 7: [Installed packages listed in PyCharms "Python Packages" window](figures/1004-venv_2.png) + + +[![PyCharm will discover and offer to install unfulfilled requirements](figures/1005-pip_install.png)](figures/1005-pip_install.png) +Figure 8: [PyCharm will discover and offer to install unfulfilled requirements](figures/1005-pip_install.png) + + +[![By default, this terminal shows only white text](figures/1006-terminal_colors.png)](figures/1006-terminal_colors.png) +Figure 9: [By default, this terminal shows only white text](figures/1006-terminal_colors.png) + + +[![Our game output also uses the terminal default](figures/1006-terminal_colors_2.png)](figures/1006-terminal_colors_2.png) +Figure 10: [Our game output also uses the terminal default](figures/1006-terminal_colors_2.png) + + +[![Colorama allows for very easy color output](figures/1006-terminal_colors_3.png)](figures/1006-terminal_colors_3.png) +Figure 11: [Colorama allows for very easy color output](figures/1006-terminal_colors_3.png) + + +[![Error messages in red really stand out](figures/1006-terminal_colors_4.png)](figures/1006-terminal_colors_4.png) +Figure 12: [Error messages in red really stand out](figures/1006-terminal_colors_4.png) + + +[![The winner of a round is not at all obvious](figures/1006-terminal_colors_5.png)](figures/1006-terminal_colors_5.png) +Figure 13: [The winner of a round is not at all obvious](figures/1006-terminal_colors_5.png) + + +[![Now we quickly identity the outcome: green for win, red for loss](figures/1006-terminal_colors_6.png)](figures/1006-terminal_colors_6.png) +Figure 14: [Now we quickly identity the outcome: green for win, red for loss](figures/1006-terminal_colors_6.png) + + +[![The overall game winner is also colorized](figures/1006-terminal_colors_7.png)](figures/1006-terminal_colors_7.png) +Figure 15: [The overall game winner is also colorized](figures/1006-terminal_colors_7.png) + + +[![Autocomplete / dropdown selection *in the terminal*](figures/1007-autocomplete.png)](figures/1007-autocomplete.png) +Figure 16: [Autocomplete / dropdown selection *in the terminal*](figures/1007-autocomplete.png) + + +[![`prompt_toolkit` requires a full terminal to run](figures/1007-error.png)](figures/1007-error.png) +Figure 17: [`prompt_toolkit` requires a full terminal to run](figures/1007-error.png) + + +[![Now we have customized the dropdown style](figures/1008-dropdown.png)](figures/1008-dropdown.png) +Figure 18: [Now we have customized the dropdown style](figures/1008-dropdown.png) + + +[![External package workflow: declare, install, use](figures/1009-using_external_libraries.png)](figures/1009-using_external_libraries.png) +Figure 19: [External package workflow: declare, install, use](figures/1009-using_external_libraries.png) + + +[![Be sure to practice working with external packages](figures/1010-practice.png)](figures/1010-practice.png) +Figure 20: [Be sure to practice working with external packages](figures/1010-practice.png) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1101-error.png b/book/gallery/chapters/ch-11-error-handling/figures/1101-error.png new file mode 100644 index 0000000..41cd3f6 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1101-error.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1102-directory.png b/book/gallery/chapters/ch-11-error-handling/figures/1102-directory.png new file mode 100644 index 0000000..a3412b6 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1102-directory.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1102-install.png b/book/gallery/chapters/ch-11-error-handling/figures/1102-install.png new file mode 100644 index 0000000..a46d384 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1102-install.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1102-running.png b/book/gallery/chapters/ch-11-error-handling/figures/1102-running.png new file mode 100644 index 0000000..08094d2 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1102-running.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1103-error.jpg b/book/gallery/chapters/ch-11-error-handling/figures/1103-error.jpg new file mode 100644 index 0000000..cb18965 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1103-error.jpg differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1103-except.png b/book/gallery/chapters/ch-11-error-handling/figures/1103-except.png new file mode 100644 index 0000000..af41493 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1103-except.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1104-detail_error.jpg b/book/gallery/chapters/ch-11-error-handling/figures/1104-detail_error.jpg new file mode 100644 index 0000000..71136a8 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1104-detail_error.jpg differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1104-error.jpg b/book/gallery/chapters/ch-11-error-handling/figures/1104-error.jpg new file mode 100644 index 0000000..d223344 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1104-error.jpg differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1104-error_2.png b/book/gallery/chapters/ch-11-error-handling/figures/1104-error_2.png new file mode 100644 index 0000000..8400006 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1104-error_2.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1104-file_missing_error_except.png b/book/gallery/chapters/ch-11-error-handling/figures/1104-file_missing_error_except.png new file mode 100644 index 0000000..19fb079 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1104-file_missing_error_except.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1104-keyboard_error.jpg b/book/gallery/chapters/ch-11-error-handling/figures/1104-keyboard_error.jpg new file mode 100644 index 0000000..0a2278a Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1104-keyboard_error.jpg differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1104-keyboard_error_except.png b/book/gallery/chapters/ch-11-error-handling/figures/1104-keyboard_error_except.png new file mode 100644 index 0000000..ea7765c Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1104-keyboard_error_except.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_2.png b/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_2.png new file mode 100644 index 0000000..3fd299c Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_2.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_3.png b/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_3.png new file mode 100644 index 0000000..1c2c641 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_3.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_4.png b/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_4.png new file mode 100644 index 0000000..e604756 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1105-debug_4.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1106-concept.png b/book/gallery/chapters/ch-11-error-handling/figures/1106-concept.png new file mode 100644 index 0000000..1b65541 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1106-concept.png differ diff --git a/book/gallery/chapters/ch-11-error-handling/figures/1107-practice.jpg b/book/gallery/chapters/ch-11-error-handling/figures/1107-practice.jpg new file mode 100644 index 0000000..a02dbb0 Binary files /dev/null and b/book/gallery/chapters/ch-11-error-handling/figures/1107-practice.jpg differ diff --git a/book/gallery/chapters/ch-11-error-handling/readme.md b/book/gallery/chapters/ch-11-error-handling/readme.md new file mode 100644 index 0000000..63444d3 --- /dev/null +++ b/book/gallery/chapters/ch-11-error-handling/readme.md @@ -0,0 +1,73 @@ +# Gallery: Chapter 11 - Error Handling + +[![Unhandled errors are the trademark of the amature programmer](figures/1101-error.png)](figures/1101-error.png) +Figure 1: [Unhandled errors are the trademark of the amature programmer](figures/1101-error.png) + + +[![We've now working in `11-error-handling` section of code](figures/1102-directory.png)](figures/1102-directory.png) +Figure 2: [We've now working in `11-error-handling` section of code](figures/1102-directory.png) + + +[![PyCharm offering to install stated, but missing, requirements](figures/1102-install.png)](figures/1102-install.png) +Figure 3: [PyCharm offering to install stated, but missing, requirements](figures/1102-install.png) + + +[![Code that can raise exceptions should be in a `try/except`](figures/1102-running.png)](figures/1102-running.png) +Figure 4: [Code that can raise exceptions should be in a `try/except`](figures/1102-running.png) + + +[![An uncaught exception results in a traceback](figures/1103-error.jpg)](figures/1103-error.jpg) +Figure 5: [An uncaught exception results in a traceback](figures/1103-error.jpg) + + +[![We've caught the error, but didn't provide details](figures/1103-except.png)](figures/1103-except.png) +Figure 6: [We've caught the error, but didn't provide details](figures/1103-except.png) + + +[![File format error handling is different than integer conversion errors](figures/1104-error.jpg)](figures/1104-error.jpg) +Figure 7: [File format error handling is different than integer conversion errors](figures/1104-error.jpg) + + +[![Catching the json error handles the invalid file formats](figures/1104-detail_error.jpg)](figures/1104-detail_error.jpg) +Figure 8: [Catching the json error handles the invalid file formats](figures/1104-detail_error.jpg) + + +[![Seems we are cathcing *overly general* errors](figures/1104-error_2.png)](figures/1104-error_2.png) +Figure 9: [Seems we are cathcing *overly general* errors](figures/1104-error_2.png) + + +[![Now we see the actual exception that was raised: `KeyboardInterrupt`](figures/1104-keyboard_error.jpg)](figures/1104-keyboard_error.jpg) +Figure 10: [Now we see the actual exception that was raised: `KeyboardInterrupt`](figures/1104-keyboard_error.jpg) + + +[![Catching the `KeyboardInterrupt` gracefully](figures/1104-keyboard_error_except.png)](figures/1104-keyboard_error_except.png) +Figure 11: [Catching the `KeyboardInterrupt` gracefully](figures/1104-keyboard_error_except.png) + + +[![We also need to handle `FileNotFoundError` in case the file is entirely missing](figures/1104-file_missing_error_except.png)](figures/1104-file_missing_error_except.png) +Figure 12: [We also need to handle `FileNotFoundError` in case the file is entirely missing](figures/1104-file_missing_error_except.png) + + +[![The debugger allows us to step through the error handling flow](figures/1105-debug_2.png)](figures/1105-debug_2.png) +Figure 13: [The debugger allows us to step through the error handling flow](figures/1105-debug_2.png) + + +[![About to enter invalid input and trigger an exception](figures/1105-debug_3.png)](figures/1105-debug_3.png) +Figure 14: [About to enter invalid input and trigger an exception](figures/1105-debug_3.png) + + +[![Jumping from `int(text)` to `except ValueError`](figures/1105-debug_4.png)](figures/1105-debug_4.png) +Figure 15: [Jumping from `int(text)` to `except ValueError`](figures/1105-debug_4.png) + + +[![General `try`/`except` error handling in Python](figures/1106-concept.png)](figures/1106-concept.png) +Figure 16: [General `try`/`except` error handling in Python](figures/1106-concept.png) + + +[![Be sure to practice writing error handling code](figures/1107-practice.jpg)](figures/1107-practice.jpg) +Figure 17: [Be sure to practice writing error handling code](figures/1107-practice.jpg) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/0802-some_techniques_7.jpg b/book/gallery/chapters/ch-12-course-conclusion/figures/0802-some_techniques_7.jpg new file mode 100644 index 0000000..75a1ce1 Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/0802-some_techniques_7.jpg differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1202-variables_types.png b/book/gallery/chapters/ch-12-course-conclusion/figures/1202-variables_types.png new file mode 100644 index 0000000..63571a5 Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1202-variables_types.png differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1203-conditionals.png b/book/gallery/chapters/ch-12-course-conclusion/figures/1203-conditionals.png new file mode 100644 index 0000000..e1cde4c Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1203-conditionals.png differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1204-functions.png b/book/gallery/chapters/ch-12-course-conclusion/figures/1204-functions.png new file mode 100644 index 0000000..22def41 Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1204-functions.png differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1205-data_structures.jpg b/book/gallery/chapters/ch-12-course-conclusion/figures/1205-data_structures.jpg new file mode 100644 index 0000000..2d2181d Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1205-data_structures.jpg differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1205-data_structures_2.png b/book/gallery/chapters/ch-12-course-conclusion/figures/1205-data_structures_2.png new file mode 100644 index 0000000..6dc609f Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1205-data_structures_2.png differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1207-file_io.png b/book/gallery/chapters/ch-12-course-conclusion/figures/1207-file_io.png new file mode 100644 index 0000000..efc8932 Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1207-file_io.png differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1208-external_packages.png b/book/gallery/chapters/ch-12-course-conclusion/figures/1208-external_packages.png new file mode 100644 index 0000000..b4a33bd Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1208-external_packages.png differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1209-git.png b/book/gallery/chapters/ch-12-course-conclusion/figures/1209-git.png new file mode 100644 index 0000000..cbefc91 Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1209-git.png differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/figures/1210-get-in-the-game.jpg b/book/gallery/chapters/ch-12-course-conclusion/figures/1210-get-in-the-game.jpg new file mode 100644 index 0000000..23fdf45 Binary files /dev/null and b/book/gallery/chapters/ch-12-course-conclusion/figures/1210-get-in-the-game.jpg differ diff --git a/book/gallery/chapters/ch-12-course-conclusion/readme.md b/book/gallery/chapters/ch-12-course-conclusion/readme.md new file mode 100644 index 0000000..b2dadf3 --- /dev/null +++ b/book/gallery/chapters/ch-12-course-conclusion/readme.md @@ -0,0 +1,45 @@ +# Gallery: Chapter 12 - Course Conclusion + +[![Variables have a *type* in Python, even if you don't state it explicitly](figures/1202-variables_types.png)](figures/1202-variables_types.png) +Figure 1: [Variables have a *type* in Python, even if you don't state it explicitly](figures/1202-variables_types.png) + + +[![Conditional statements are defined with `if`, `elif`, and `else`](figures/1203-conditionals.png)](figures/1203-conditionals.png) +Figure 2: [Conditional statements are defined with `if`, `elif`, and `else`](figures/1203-conditionals.png) + + +[![Functions allow us to organize and resuse code](figures/1204-functions.png)](figures/1204-functions.png) +Figure 3: [Functions allow us to organize and resuse code](figures/1204-functions.png) + + +[![Data structures allow for cleaner, more maintainable code](figures/1205-data_structures.jpg)](figures/1205-data_structures.jpg) +Figure 4: [Data structures allow for cleaner, more maintainable code](figures/1205-data_structures.jpg) + + +[![Dictionaries are the most common data structure in Python](figures/1205-data_structures_2.png)](figures/1205-data_structures_2.png) +Figure 5: [Dictionaries are the most common data structure in Python](figures/1205-data_structures_2.png) + + +[![Keep these problem-solving techniques in mind as you solve problems with code](figures/0802-some_techniques_7.jpg)](figures/0802-some_techniques_7.jpg) +Figure 6: [Keep these problem-solving techniques in mind as you solve problems with code](figures/0802-some_techniques_7.jpg) + + +[![File I/O in Python is straightforward and often has a library to handle the details](figures/1207-file_io.png)](figures/1207-file_io.png) +Figure 7: [File I/O in Python is straightforward and often has a library to handle the details](figures/1207-file_io.png) + + +[![How are you flying? `pip install antigravity` (actually work in REPL)](figures/1208-external_packages.png)](figures/1208-external_packages.png) +Figure 8: [How are you flying? `pip install antigravity` (actually work in REPL)](figures/1208-external_packages.png) + + +[![Be sure to fork the repo before you go](figures/1209-git.png)](figures/1209-git.png) +Figure 9: [Be sure to fork the repo before you go](figures/1209-git.png) + + +[![You've done hours of practice, it's time to get in the game](figures/1210-get-in-the-game.jpg)](figures/1210-get-in-the-game.jpg) +Figure 10: [You've done hours of practice, it's time to get in the game](figures/1210-get-in-the-game.jpg) + + + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/gallery/readme.md b/book/gallery/readme.md new file mode 100644 index 0000000..6d3f688 --- /dev/null +++ b/book/gallery/readme.md @@ -0,0 +1,20 @@ +# Course gallery + +This gallery contains all the figures from the Python for the Absolute Beginner Companion book. It contains full size images for every chapter in the book. + +- [Chapter 1: Welcome to the Course](chapters/ch-01-welcome-to-the-course) +- [Chapter 2: Course Setup and Requirements](chapters/ch-02-course-setup-and-requirements) +- [Chapter 3: The Big Ideas of Software Development](chapters/ch-03-the-big-ideas-of-software-development) +- [Chapter 4: Writing your first line of code](chapters/ch-04-writing-your-first-line-of-code) +- [Chapter 5: Code that interacts with users](chapters/ch-05-code-that-interacts-with-users) +- [Chapter 6: Organizing and Reusing Code with Functions](chapters/ch-06-organizing-and-reusing-code-with-functions) +- [Chapter 7: Cleaner Code with Common Data Structures](chapters/ch-07-cleaner-code-with-common-data-structures) +- [Chapter 8: Problem-Solving Techniques for Writing Software](chapters/ch-08-problem-solving-techniques-for-writing-software) +- [Chapter 9: Reading and Writing Files](chapters/ch-09-reading-and-writing-files) +- [Chapter 10: Using External Python Packages](chapters/ch-10-using-external-python-packages) +- [Chapter 11: Error Handling](chapters/ch-11-error-handling) +- [Chapter 12: Course Conclusion](chapters/ch-12-course-conclusion) +- [Appendix 1: Jupyter as Your Editor](chapters/ap-01-jupyter-as-your-editor) + +**LICENSE**: Images in the figure gallery are copyright and not available for reuse. + diff --git a/book/readme.md b/book/readme.md new file mode 100644 index 0000000..0dca6c6 --- /dev/null +++ b/book/readme.md @@ -0,0 +1,16 @@ +# Python for the Absolute Beginner Book + +![](readme_resources/absolute-beginners-book-cover-sm.jpg) + + + +Roger and I are working on a book to accompany this course. As part of this repo, we want to make sure everyone has access to the full resolution images use as figures. They appear here now, a bit ahead of the release of the book. + +If you want to get notified of the book launch, be sure to [**join our mailing list at Talk Python**](https://training.talkpython.fm/getnotified). + +## Gallery of figures + +[**Browse the gallery by chapter**](gallery). + + + diff --git a/book/readme_resources/absolute-beginners-book-cover-sm.jpg b/book/readme_resources/absolute-beginners-book-cover-sm.jpg new file mode 100644 index 0000000..52fb46b Binary files /dev/null and b/book/readme_resources/absolute-beginners-book-cover-sm.jpg differ