├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── conversion_tools ├── README.md ├── TOC.yml ├── TODO.md ├── copy_images_dir.py ├── environment-website.yml ├── environment.yml ├── filter_links.py ├── make_mkdocs_yaml.py ├── md_not_converted.tpl ├── nb2html.py ├── nb2latex.py ├── nb2mkdocs.py ├── nb_list_tools.py ├── templates │ ├── book37.tplx │ ├── book_PUU.tplx │ ├── custom_colors.tplx │ ├── environments.tplx │ ├── noprompts.tplx │ └── packages.tplx ├── tex_modify_contents.py └── yaml_TOC.py ├── environment.yml ├── notebooks ├── 00-Preface │ ├── 00.00-Motivation.ipynb │ ├── 00.02-Acknowledgments.ipynb │ ├── 00.03-Supporting-Materials.ipynb │ ├── 00.04-Formatting-Conventions.ipynb │ └── 00.05-Errata.ipynb ├── 01-Orientation │ ├── 01.00-Welcome.ipynb │ ├── 01.01-Why-Python.ipynb │ ├── 01.02-The-Anaconda-Distribution-of-Python.ipynb │ ├── 01.03-Installing-Anaconda-on-Windows.ipynb │ ├── 01.04-Installing-Anaconda-on-MacOS.ipynb │ ├── 01.05-Installing-Anaconda-on-Linux.ipynb │ ├── 01.06-Installing-Python-from-Python-dot-org.ipynb │ ├── 01.07-Summary.ipynb │ ├── 01.08-Review-Questions.ipynb │ └── images │ │ ├── Anaconda_download_linux.png │ │ ├── anaconda_agree_to_license.png │ │ ├── anaconda_download_mac.png │ │ ├── anaconda_download_mac_ask_for_email.png │ │ ├── anaconda_download_page.png │ │ ├── anaconda_downloading.png │ │ ├── anaconda_enter_email.png │ │ ├── anaconda_from_start_menu.png │ │ ├── anaconda_install_linux_copy_link_address.png │ │ ├── anaconda_installer_advanced_options.png │ │ ├── anaconda_installer_click_next.png │ │ ├── anaconda_path2.png │ │ ├── anaconda_prompt.png │ │ ├── anaconda_python3_or_python2.png │ │ ├── anaconda_run_installer.png │ │ ├── anaconda_select_windows.png │ │ ├── anaconda_window.png │ │ ├── conda_import_this.png │ │ ├── conda_import_this_output.png │ │ ├── conda_in_windows_start_menu.png │ │ ├── conda_prompt_type_python.png │ │ ├── conda_type_python.png │ │ ├── python_dot_org_macos_download.PNG │ │ └── python_dot_org_windows_download.PNG ├── 02-Jupyter-Notebooks │ ├── 02.00-Introduction.ipynb │ ├── 02.01-What-is-a-Jupyter-Notebook.ipynb │ ├── 02.02-Why-Jupyter-Notebooks.ipynb │ ├── 02.03-Installing-Juypter.ipynb │ ├── 02.04-Opening-a-Jupyter-Notebook.ipynb │ ├── 02.05-The-Jupyter-Notebook-Interface.ipynb │ ├── 02.06-Magic-Commands.ipynb │ ├── 02.07-Getting-Help-in-a-Jupyter-Notebook.ipynb │ ├── 02.08-Summary.ipynb │ ├── 02.09-Review-Questions.ipynb │ ├── hello.py │ └── images │ │ ├── Anaconda_Prompt_Jupyter_Notebook.png │ │ ├── Jupyter_Home_Browser.png │ │ ├── anaconda_navigator_jupyter_notebook_launch.png │ │ ├── anaconda_navigator_jupyter_notebook_start.png │ │ ├── anaconda_start_menu.png │ │ ├── change_cell_type.png │ │ ├── click_change_name.png │ │ ├── code_cell.png │ │ ├── downloading_complete.png │ │ ├── engineering.png │ │ ├── file_download_as_notebook.png │ │ ├── file_make_a_copy.png │ │ ├── insert_cell_above.png │ │ ├── jupyter_notebook_anaconda_prompt.png │ │ ├── jupyter_notebook_dot_py_file.png │ │ ├── jupyter_notebook_example.png │ │ ├── jupyter_notebook_export_options.png │ │ ├── jupyter_notebook_markdown_cells_as_comments.png │ │ ├── kernel_restart_and_clear_output.png │ │ ├── markdown_cell.png │ │ ├── new_notebook.png │ │ ├── new_notebook_from_browser.png │ │ ├── notebook_file_browser.png │ │ ├── notebook_file_browser_click_folder.png │ │ ├── notebook_file_browser_click_notebook.png │ │ ├── notebook_json.png │ │ ├── output_cell.png │ │ ├── rename_dialog.png │ │ ├── rename_notebook.png │ │ ├── rename_window.png │ │ ├── run_cell.png │ │ ├── run_import_this.png │ │ ├── save_notebook.png │ │ ├── windows_start_anaconda_navigator.png │ │ └── windows_start_jupyter_notebook.png ├── 03-The-Python-REPL │ ├── 03.00-Introduction.ipynb │ ├── 03.01-Python-as-a-Calculator.ipynb │ ├── 03.02-Variables.ipynb │ ├── 03.03-String-Operations.ipynb │ ├── 03.04-Print-Statements.ipynb │ ├── 03.05-Summary.ipynb │ └── 03.06-Review-Questions.ipynb ├── 04-Data-Types-and-Variables │ ├── 04.00-Introduction.ipynb │ ├── 04.01-Numeric-Data-Types.ipynb │ ├── 04.02-Boolean-Data-Type.ipynb │ ├── 04.03-Strings.ipynb │ ├── 04.04-Lists.ipynb │ ├── 04.05-Dictionaries-and-Tuples.ipynb │ ├── 04.06-Summary.ipynb │ ├── 04.07-Review-Questions.ipynb │ └── images │ │ ├── reverse_string_indexing.png │ │ ├── reverse_string_indexing.xml │ │ ├── string_indexing.png │ │ └── string_indexing.xml ├── 05-NumPy-and-Arrays │ ├── 05.00-Introduction.ipynb │ ├── 05.01-NumPy.ipynb │ ├── 05.02-Installing-NumPy.ipynb │ ├── 05.03-Python-Lists-and-NumPy-Arrays.ipynb │ ├── 05.04-Array-Creation.ipynb │ ├── 05.05-Array-Indexing.ipynb │ ├── 05.06-Array-Slicing.ipynb │ ├── 05.07-Array-Opperations.ipynb │ ├── 05.08-Systems-of-Linear-Equations.ipynb │ ├── 05.09-Summary.ipynb │ └── 05.10-Review-Questions.ipynb ├── 06-Plotting-with-Matplotlib │ ├── 06.00-Introduction.ipynb │ ├── 06.01-What-is-Matplotlib.ipynb │ ├── 06.02-Installing Matplotlib.ipynb │ ├── 06.03-Line-Plots.ipynb │ ├── 06.04-Saving-Plots.ipynb │ ├── 06.05-Multi-Line-Plots.ipynb │ ├── 06.06-Bar-Charts-and-Pie-Charts.ipynb │ ├── 06.07-Error-Bars.ipynb │ ├── 06.08-Histograms.ipynb │ ├── 06.09-Box-Plots-and-Violin-Plots.ipynb │ ├── 06.10-Scatter-Plots.ipynb │ ├── 06.11-Plot-Annotations.ipynb │ ├── 06.12-Subplots.ipynb │ ├── 06.13-Plot-Styles.ipynb │ ├── 06.14-Contour-Plots.ipynb │ ├── 06.15-Quiver-and-Stream-Plots.ipynb │ ├── 06.16-3D-Surface-Plots.ipynb │ ├── 06.17-Summary.ipynb │ ├── 06.18-Review-Questions.ipynb │ ├── 3_quiver_plots.png │ ├── bar_plot.png │ ├── bar_plot_with_error_bars.png │ ├── images │ │ ├── 3_quiver_plots.png │ │ ├── bar_plot.png │ │ ├── bar_plot_with_error_bars.png │ │ └── plot.png │ └── plot.png ├── 07-Functions-and-Modules │ ├── 07.00-Introduction.ipynb │ ├── 07.01-Why-Functions.ipynb │ ├── 07.02-First-Function.ipynb │ ├── 07.03-Functions-with-multiple-arguments.ipynb │ ├── 07.04-Functions-with-default-arguments.ipynb │ ├── 07.05-Calling-Functions-from-Other-Files.ipynb │ ├── 07.06-Docstrings-in-Functions.ipynb │ ├── 07.07-Positional-and-Keyword-Arguments.ipynb │ ├── 07.08-Summary.ipynb │ ├── 07.09-Review-Questions.ipynb │ └── myfunctions.py ├── 08-If-Else-Try-Except │ ├── 08.00-Introduction.ipynb │ ├── 08.01-User-Input.ipynb │ ├── 08.02-Selection-Statements.ipynb │ ├── 08.03-If-Statements.ipynb │ ├── 08.04-If-Else-Statements.ipynb │ ├── 08.05-Try-Except-Statements.ipynb │ ├── 08.06-Flowcharts.ipynb │ ├── 08.07-Summary.ipynb │ ├── 08.08-Review-Questions.ipynb │ └── images │ │ ├── flow_chart_calculation_program.png │ │ ├── flow_chart_calculation_program.xml │ │ ├── flow_chart_more_complex_user_input_program.png │ │ ├── flow_chart_more_complex_user_input_program.xml │ │ ├── flow_chart_simple_print_program.png │ │ ├── flow_chart_simple_print_program.xml │ │ ├── flow_chart_simple_user_input_program.png │ │ ├── flow_chart_simple_user_input_program.xml │ │ ├── flow_chart_user_input_program.xml │ │ ├── four_flow_chart_shapes.png │ │ └── four_flow_chart_shapes.xml ├── 09-Loops │ ├── 09.00-Introduction.ipynb │ ├── 09.01-For-Loops.ipynb │ ├── 09.02-While-Loops.ipynb │ ├── 09.03-Break-and-Continue.ipynb │ ├── 09.04-Flowcharts-Describing-Loops.ipynb │ ├── 09.05-Summary.ipynb │ ├── 09.06-Review-Questions.ipynb │ └── images │ │ ├── flow_chart_of_program_that_contains_a_for_loop.png │ │ ├── flow_chart_of_program_that_contains_a_for_loop.xml │ │ ├── flow_chart_of_program_that_contains_a_while_loop.png │ │ ├── flow_chart_of_program_that_contains_a_while_loop.xml │ │ ├── four_flow_chart_shapes.png │ │ └── four_flow_chart_shapes.xml ├── 10-Symbolic-Math │ ├── 10.00-Introduction.ipynb │ ├── 10.01-SymPy.ipynb │ ├── 10.02-Installing-SymPy.ipynb │ ├── 10.03-Defining-Variables.ipynb │ ├── 10.04-Expressions-and-Substitutions.ipynb │ ├── 10.05-Equations.ipynb │ ├── 10.06-Solving-Equations.ipynb │ ├── 10.07-Solving-Two-Equations-for-Two-Unknowns.ipynb │ ├── 10.08-Summary.ipynb │ ├── 10.09-Review-Questions.ipynb │ └── images │ │ └── statics_problem_diagram.png ├── 11-Python-and-External-Hardware │ ├── 11.00-Introduction.ipynb │ ├── 11.01-PySerial.ipynb │ ├── 11.02-Bytes-and-Unicode-Strings.ipynb │ ├── 11.03-Controlling-an-LED.ipynb │ ├── 11.04-Reading-a-Sensor-with-Python.ipynb │ ├── 11.05-Summary.ipynb │ ├── 11.06-Project-Ideas.ipynb │ ├── images │ │ ├── Arduino_LED_fritzing.png │ │ ├── Arrow_to_Upload.png │ │ ├── Check_to_Verify.png │ │ ├── Examples_Com_PhysicalPixel.png │ │ ├── SerialMonitor_H.png │ │ ├── Tools_SerialMonitor.png │ │ ├── Tools_SerialPlotter.png │ │ ├── arduino_LED.png │ │ ├── arduino_LED.svg │ │ ├── arduino_download_page.png │ │ ├── arduino_led.fzz │ │ ├── arduino_potentiometer.fzz │ │ ├── arduino_potentiometer.svg │ │ ├── download_Arduino_IDE.png │ │ ├── file-examples-communication-physicalpixel.png │ │ ├── matplotlib_potentiometer_plot.png │ │ ├── redboard_LED.fzz │ │ ├── redboard_LED_bb.png │ │ ├── redboard_LED_potentiometer.fzz │ │ ├── redboard_pot_led_fritzing.png │ │ ├── serial_monitor_L.png │ │ ├── serial_monitor_output.png │ │ └── serial_plotter_output.png │ └── potentiometer_read.ino ├── 12-MicroPython │ ├── 12.00-Introduction.ipynb │ ├── 12.01-What-is-MicroPython.ipynb │ ├── 12.02-Installing-MicroPython.ipynb │ ├── 12.03-MicroPython-REPL.ipynb │ ├── 12.04-Blinking-a-LED.ipynb │ ├── 12.05-Reading-a-Sensor.ipynb │ ├── 12.06-Uploading-Code.ipynb │ ├── 12.07-Summary.ipynb │ ├── 12.08-Project-Ideas.ipynb │ └── images │ │ ├── Anaconda_Prompt.PNG │ │ ├── Anaconda_choose_python_version.PNG │ │ ├── Anaconda_downloads_page.PNG │ │ ├── MicroPython_in_jupyter_notebook.png │ │ ├── REPL_prompt.PNG │ │ ├── active_new_conda_env.PNG │ │ ├── bin_file_to_new_directory.PNG │ │ ├── bin_in_dir.PNG │ │ ├── conda_activate.PNG │ │ ├── conda_create_new_virtualenv.PNG │ │ ├── conda_install_mpy-repl-tool.jpg │ │ ├── conda_list.PNG │ │ ├── conda_there-jupyter-setup.png │ │ ├── device_manager_menu.png │ │ ├── download_putty.PNG │ │ ├── download_silabs_driver.PNG │ │ ├── downloads_folder.PNG │ │ ├── esptool_erase_flash.PNG │ │ ├── esptool_help.PNG │ │ ├── esptool_write_flash.PNG │ │ ├── feather_huzzah_temp_sensor_fritzing.png │ │ ├── find_device_manager.png │ │ ├── firmware_download_page.PNG │ │ ├── import_port_diag.PNG │ │ ├── micropython_modules.png │ │ ├── mkdir_micropython.PNG │ │ ├── pip_install_esptool.PNG │ │ ├── putty_config.PNG │ │ ├── putty_in_start_menu.png │ │ ├── sys_dot_implementation_and_platform.PNG │ │ ├── sys_dot_platform.PNG │ │ └── there.jupyter-setup.png ├── 99-Appendix │ ├── 99.00-Appendix.ipynb │ ├── 99.01-Reserved-and-Key-Words-in-Python.ipynb │ ├── 99.02-ASCII-Character-Codes.ipynb │ ├── 99.03-Virtual-Environments.ipynb │ ├── 99.04-NumPy-Math-Functions.ipynb │ ├── 99.05-Git-and-GitHub.ipynb │ ├── 99.06-LaTeX-Math.ipynb │ ├── 99.07-Problem-Solving-with-Python-Book-Construction.ipynb │ ├── 99.08-Contributions.ipynb │ ├── 99.09-Cover-Artwork.ipynb │ └── 99.10-About-the-Author.ipynb └── figures │ └── anaconda_download_page.png ├── pdf ├── README.md ├── copywrite_page.tex └── dedication_page.tex ├── requirements.txt ├── runtime.txt ├── templates ├── book37.tplx ├── book_PUU.tplx ├── custom_colors.tplx ├── environments.tplx ├── noprompts.tplx └── packages.tplx └── website ├── docs ├── 00-Preface │ ├── 00.00-Motivation.md │ ├── 00.02-Acknowledgments.md │ ├── 00.03-Supporting-Materials.md │ ├── 00.04-Formatting-Conventions.md │ └── 00.05-Errata.md ├── 01-Orientation │ ├── 01.00-Welcome.md │ ├── 01.01-Why-Python.md │ ├── 01.02-The-Anaconda-Distribution-of-Python.md │ ├── 01.03-Installing-Anaconda-on-Windows.md │ ├── 01.04-Installing-Anaconda-on-MacOS.md │ ├── 01.05-Installing-Anaconda-on-Linux.md │ ├── 01.06-Installing-Python-from-Python-dot-org.md │ ├── 01.07-Summary.md │ ├── 01.08-Review-Questions.md │ └── images │ │ ├── Anaconda_download_linux.png │ │ ├── anaconda_agree_to_license.png │ │ ├── anaconda_download_mac.png │ │ ├── anaconda_download_mac_ask_for_email.png │ │ ├── anaconda_download_page.png │ │ ├── anaconda_downloading.png │ │ ├── anaconda_enter_email.png │ │ ├── anaconda_from_start_menu.png │ │ ├── anaconda_install_linux_copy_link_address.png │ │ ├── anaconda_installer_advanced_options.png │ │ ├── anaconda_installer_click_next.png │ │ ├── anaconda_path2.png │ │ ├── anaconda_prompt.png │ │ ├── anaconda_python3_or_python2.png │ │ ├── anaconda_run_installer.png │ │ ├── anaconda_select_windows.png │ │ ├── anaconda_window.png │ │ ├── conda_import_this.png │ │ ├── conda_import_this_output.png │ │ ├── conda_in_windows_start_menu.png │ │ ├── conda_prompt_type_python.png │ │ ├── conda_type_python.png │ │ ├── python_dot_org_macos_download.PNG │ │ └── python_dot_org_windows_download.PNG ├── 02-Jupyter-Notebooks │ ├── 02.00-Introduction.md │ ├── 02.01-What-is-a-Jupyter-Notebook.md │ ├── 02.02-Why-Jupyter-Notebooks.md │ ├── 02.03-Installing-Juypter.md │ ├── 02.04-Opening-a-Jupyter-Notebook.md │ ├── 02.05-The-Jupyter-Notebook-Interface.md │ ├── 02.06-Magic-Commands.md │ ├── 02.07-Getting-Help-in-a-Jupyter-Notebook.md │ ├── 02.08-Summary.md │ ├── 02.09-Review-Questions.md │ └── images │ │ ├── Anaconda_Prompt_Jupyter_Notebook.png │ │ ├── Jupyter_Home_Browser.png │ │ ├── anaconda_navigator_jupyter_notebook_launch.png │ │ ├── anaconda_navigator_jupyter_notebook_start.png │ │ ├── anaconda_start_menu.png │ │ ├── change_cell_type.png │ │ ├── click_change_name.png │ │ ├── code_cell.png │ │ ├── downloading_complete.png │ │ ├── engineering.png │ │ ├── file_download_as_notebook.png │ │ ├── file_make_a_copy.png │ │ ├── insert_cell_above.png │ │ ├── jupyter_notebook_anaconda_prompt.png │ │ ├── jupyter_notebook_dot_py_file.png │ │ ├── jupyter_notebook_example.png │ │ ├── jupyter_notebook_export_options.png │ │ ├── jupyter_notebook_markdown_cells_as_comments.png │ │ ├── kernel_restart_and_clear_output.png │ │ ├── markdown_cell.png │ │ ├── new_notebook.png │ │ ├── new_notebook_from_browser.png │ │ ├── notebook_file_browser.png │ │ ├── notebook_file_browser_click_folder.png │ │ ├── notebook_file_browser_click_notebook.png │ │ ├── notebook_json.png │ │ ├── output_cell.png │ │ ├── rename_dialog.png │ │ ├── rename_notebook.png │ │ ├── rename_window.png │ │ ├── run_cell.png │ │ ├── run_import_this.png │ │ ├── save_notebook.png │ │ ├── windows_start_anaconda_navigator.png │ │ └── windows_start_jupyter_notebook.png ├── 03-The-Python-REPL │ ├── 03.00-Introduction.md │ ├── 03.01-Python-as-a-Calculator.md │ ├── 03.02-Variables.md │ ├── 03.03-String-Operations.md │ ├── 03.04-Print-Statements.md │ ├── 03.05-Summary.md │ └── 03.06-Review-Questions.md ├── 04-Data-Types-and-Variables │ ├── 04.00-Introduction.md │ ├── 04.01-Numeric-Data-Types.md │ ├── 04.02-Boolean-Data-Type.md │ ├── 04.03-Strings.md │ ├── 04.04-Lists.md │ ├── 04.05-Dictionaries-and-Tuples.md │ ├── 04.06-Summary.md │ ├── 04.07-Review-Questions.md │ └── images │ │ ├── reverse_string_indexing.png │ │ ├── reverse_string_indexing.xml │ │ ├── string_indexing.png │ │ └── string_indexing.xml ├── 05-NumPy-and-Arrays │ ├── 05.00-Introduction.md │ ├── 05.01-NumPy.md │ ├── 05.02-Installing-NumPy.md │ ├── 05.03-Python-Lists-and-NumPy-Arrays.md │ ├── 05.04-Array-Creation.md │ ├── 05.05-Array-Indexing.md │ ├── 05.06-Array-Slicing.md │ ├── 05.07-Array-Opperations.md │ ├── 05.08-Systems-of-Linear-Equations.md │ ├── 05.09-Summary.md │ └── 05.10-Review-Questions.md ├── 06-Plotting-with-Matplotlib │ ├── 06.00-Introduction.md │ ├── 06.01-What-is-Matplotlib.md │ ├── 06.02-Installing Matplotlib.md │ ├── 06.03-Line-Plots.md │ ├── 06.04-Saving-Plots.md │ ├── 06.05-Multi-Line-Plots.md │ ├── 06.06-Bar-Charts-and-Pie-Charts.md │ ├── 06.07-Error-Bars.md │ ├── 06.08-Histograms.md │ ├── 06.09-Box-Plots-and-Violin-Plots.md │ ├── 06.10-Scatter-Plots.md │ ├── 06.11-Plot-Annotations.md │ ├── 06.12-Subplots.md │ ├── 06.13-Plot-Styles.md │ ├── 06.14-Contour-Plots.md │ ├── 06.15-Quiver-and-Stream-Plots.md │ ├── 06.16-3D-Surface-Plots.md │ ├── 06.17-Summary.md │ ├── 06.18-Review-Questions.md │ └── images │ │ ├── 3_quiver_plots.png │ │ ├── bar_plot.png │ │ ├── bar_plot_with_error_bars.png │ │ └── plot.png ├── 07-Functions-and-Modules │ ├── 07.00-Introduction.md │ ├── 07.01-Why-functions.md │ ├── 07.02-First-function.md │ ├── 07.03-Functions-with-multiple-arguments.md │ ├── 07.04-Functions-with-default-arguments.md │ ├── 07.05-Calling-Functions-from-Other-Files.md │ ├── 07.06-Docstrings-in-Functions.md │ ├── 07.07-Positional-and-Keyword-Arguments.md │ ├── 07.08-Summary.md │ └── 07.09-Review-Questions.md ├── 08-If-Else-Try-Except │ ├── 08.00-Introduction.md │ ├── 08.01-User-Input.md │ ├── 08.02-Selection-Statements.md │ ├── 08.03-If-Statements.md │ ├── 08.04-If-Else-Statements.md │ ├── 08.05-Try-Except-Statements.md │ ├── 08.06-Flowcharts.md │ ├── 08.07-Summary.md │ ├── 08.08-Review-Questions.md │ └── images │ │ ├── flow_chart_calculation_program.png │ │ ├── flow_chart_calculation_program.xml │ │ ├── flow_chart_more_complex_user_input_program.png │ │ ├── flow_chart_more_complex_user_input_program.xml │ │ ├── flow_chart_simple_print_program.png │ │ ├── flow_chart_simple_print_program.xml │ │ ├── flow_chart_simple_user_input_program.png │ │ ├── flow_chart_simple_user_input_program.xml │ │ ├── flow_chart_user_input_program.xml │ │ ├── four_flow_chart_shapes.png │ │ └── four_flow_chart_shapes.xml ├── 09-Loops │ ├── 09.00-Introduction.md │ ├── 09.01-For-Loops.md │ ├── 09.02-While-Loops.md │ ├── 09.03-Break-and-Continue.md │ ├── 09.04-Flowcharts-Describing-Loops.md │ ├── 09.05-Summary.md │ ├── 09.06-Review-Questions.md │ └── images │ │ ├── flow_chart_of_program_that_contains_a_for_loop.png │ │ ├── flow_chart_of_program_that_contains_a_for_loop.xml │ │ ├── flow_chart_of_program_that_contains_a_while_loop.png │ │ ├── flow_chart_of_program_that_contains_a_while_loop.xml │ │ ├── four_flow_chart_shapes.png │ │ └── four_flow_chart_shapes.xml ├── 10-Symbolic-Math │ ├── 10.00-Introduction.md │ ├── 10.01-SymPy.md │ ├── 10.02-Installing-SymPy.md │ ├── 10.03-Defining-Variables.md │ ├── 10.04-Expressions-and-Substitutions.md │ ├── 10.05-Equations.md │ ├── 10.06-Solving-Equations.md │ ├── 10.07-Solving-Two-Equations-for-Two-Unknowns.md │ ├── 10.08-Summary.md │ ├── 10.09-Review-Questions.md │ └── images │ │ └── statics_problem_diagram.png ├── 11-Python-and-External-Hardware │ ├── 11.00-Introduction.md │ ├── 11.01-PySerial.md │ ├── 11.02-Bytes-and-Unicode-Strings.md │ ├── 11.03-Controlling-an-LED.md │ ├── 11.04-Reading-a-Sensor-with-Python.md │ ├── 11.05-Summary.md │ ├── 11.06-Project-Ideas.md │ └── images │ │ ├── Arduino_LED_fritzing.png │ │ ├── Arrow_to_Upload.png │ │ ├── Check_to_Verify.png │ │ ├── Examples_Com_PhysicalPixel.png │ │ ├── SerialMonitor_H.png │ │ ├── Tools_SerialMonitor.png │ │ ├── Tools_SerialPlotter.png │ │ ├── arduino_LED.png │ │ ├── arduino_LED.svg │ │ ├── arduino_download_page.png │ │ ├── arduino_led.fzz │ │ ├── arduino_potentiometer.fzz │ │ ├── arduino_potentiometer.svg │ │ ├── download_Arduino_IDE.png │ │ ├── file-examples-communication-physicalpixel.png │ │ ├── matplotlib_potentiometer_plot.png │ │ ├── redboard_LED.fzz │ │ ├── redboard_LED_bb.png │ │ ├── redboard_LED_potentiometer.fzz │ │ ├── redboard_pot_led_fritzing.png │ │ ├── serial_monitor_L.png │ │ ├── serial_monitor_output.png │ │ └── serial_plotter_output.png ├── 12-MicroPython │ ├── 12.00-Introduction.md │ ├── 12.01-What-is-MicroPython.md │ ├── 12.02-Installing-MicroPython.md │ ├── 12.03-MicroPython-REPL.md │ ├── 12.04-Blinking-a-LED.md │ ├── 12.05-Reading-a-Sensor.md │ ├── 12.06-Uploading-Code.md │ ├── 12.07-Summary.md │ ├── 12.08-Project-Ideas.md │ └── images │ │ ├── Anaconda_Prompt.PNG │ │ ├── Anaconda_choose_python_version.PNG │ │ ├── Anaconda_downloads_page.PNG │ │ ├── MicroPython_in_jupyter_notebook.png │ │ ├── REPL_prompt.PNG │ │ ├── active_new_conda_env.PNG │ │ ├── bin_file_to_new_directory.PNG │ │ ├── bin_in_dir.PNG │ │ ├── conda_activate.PNG │ │ ├── conda_create_new_virtualenv.PNG │ │ ├── conda_install_mpy-repl-tool.jpg │ │ ├── conda_list.PNG │ │ ├── conda_there-jupyter-setup.png │ │ ├── device_manager_menu.png │ │ ├── download_putty.PNG │ │ ├── download_silabs_driver.PNG │ │ ├── downloads_folder.PNG │ │ ├── esptool_erase_flash.PNG │ │ ├── esptool_help.PNG │ │ ├── esptool_write_flash.PNG │ │ ├── feather_huzzah_temp_sensor_fritzing.png │ │ ├── find_device_manager.png │ │ ├── firmware_download_page.PNG │ │ ├── import_port_diag.PNG │ │ ├── micropython_modules.png │ │ ├── mkdir_micropython.PNG │ │ ├── pip_install_esptool.PNG │ │ ├── putty_config.PNG │ │ ├── putty_in_start_menu.png │ │ ├── sys_dot_implementation_and_platform.PNG │ │ ├── sys_dot_platform.PNG │ │ └── there.jupyter-setup.png ├── 99-Appendix │ ├── 99.00-Appendix.md │ ├── 99.01-Reserved-and-Key-Words-in-Python.md │ ├── 99.02-ASCII-Character-Codes.md │ ├── 99.03-Virtual-Environments.md │ ├── 99.04-NumPy-Math-Functions.md │ ├── 99.05-Git-and-GitHub.md │ ├── 99.06-LaTeX-Math.md │ ├── 99.07-Problem-Solving-with-Python-Book-Construction.md │ ├── 99.08-Contributions.md │ ├── 99.09-Cover-Artwork.md │ └── 99.10-About-the-Author.md ├── figures │ └── anaconda_download_page.png └── index.md ├── mkdocs.yml └── mkdocs_config.yml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: ProfessorKazarinoff 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Problem-Solving-with-Python-37-Edition 2 | 3 | Repo for the book: Problem Solving with Python 3.7 Edition by Peter D. Kazarinoff, PhD 4 | 5 | A print copy of the book is available on Amazon: [https://www.amazon.com/dp/1693405415](https://www.amazon.com/dp/1693405415) 6 | -------------------------------------------------------------------------------- /conversion_tools/README.md: -------------------------------------------------------------------------------- 1 | # conversion_tools/README.md 2 | 3 | ## To build website: 4 | 5 | ## Create the conda environment book37-website 6 | 7 | ```text 8 | cd conversion_tools 9 | conda env -f environment-website.yml 10 | conda activate book37-website 11 | (book37-website) 12 | ``` 13 | 14 | ## Convert notebooks to html that mkdocs can read, copy images and build mkdocs.yml toc 15 | 16 | Activate the book37-website env and 17 | 18 | run the main script in nb2mkdocs.py 19 | 20 | ```text 21 | conda activate book37-website 22 | 23 | (book37-website) python nb2mkdocs.py 24 | ``` 25 | 26 | ### build and serve mkdocs site 27 | 28 | cd into the website directory and activate the ```(book37-website)``` env. Build and serve using mkdocs. 29 | 30 | ```text 31 | $ conda activate book37-env 32 | (book37-website)$ cd website 33 | (book37-website)$ mkdocs build 34 | (book37-website)$ mkdocs serve 35 | ``` 36 | 37 | ### post the website to github pages 38 | 39 | ```text 40 | (book)$ mkdocs gh-deploy 41 | ``` 42 | 43 | On windows, this didn't work initially, but the commands below to change the credential helper 44 | 45 | ``` 46 | git config --global credential.helper wincred 47 | ``` 48 | 49 | And then run with the force option seemed to work. 50 | 51 | ``` 52 | mkdocs gh-deploy --force 53 | ``` 54 | 55 | If this does not work, ensure the current working directory is website, then 56 | 57 | ```text 58 | git push -f origin gh-pages 59 | ``` 60 | 61 | After pushing the website up to GitHub, the custom domain needs to be added in the GitHub Repo settings. Pushing with gh-pages gets rid of the custom domain. 62 | 63 | ```text 64 | problemsolvingwithpython.com 65 | ``` 66 | -------------------------------------------------------------------------------- /conversion_tools/TODO.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | 3 | ## pdf 4 | 5 | - [x] Refactor template into different files for packages, preable, etc 6 | - [x] Take out empty cell at the bottom of each section when conversion to web and pdf. See [https://nbconvert.readthedocs.io/en/stable/api/preprocessors.html#nbconvert.preprocessors.RegexRemovePreprocessor](https://nbconvert.readthedocs.io/en/stable/api/preprocessors.html#nbconvert.preprocessors.RegexRemovePreprocessor) and try ```jupyter nbconvert --RegexRemovePreprocessor.patterns="['\s*\Z']" mynotebook.ipynb``` 7 | 8 | ## website 9 | 10 | - [ ] Make website build a 1 or 2 step process instead of calling three different scripts 11 | - [ ] Convert mkdocs pages in .yml to nav in .yml 12 | -------------------------------------------------------------------------------- /conversion_tools/copy_images_dir.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # ### A notebook to figure out how to copy over the images directory from notebooks to website docs 5 | 6 | # In[1]: 7 | 8 | 9 | import os 10 | import shutil 11 | from os.path import join 12 | import re 13 | 14 | 15 | # In[2]: 16 | 17 | 18 | def copy_figures_dir(nb_dir_name='notebooks',docs_dir_name='docs'): 19 | nb_dir = join(os.pardir,nb_dir_name) 20 | docs_dir = join(os.pardir,'website', docs_dir_name) 21 | scr = join(nb_dir,'figures') 22 | dst = join(docs_dir,'figures') 23 | if os.path.exists(dst): 24 | shutil.rmtree(dst) 25 | shutil.copytree(scr,dst) 26 | 27 | 28 | # In[3]: 29 | 30 | 31 | def copy_image_dirs(notebook_dir_name='notebooks', docs_dir_name='docs'): 32 | """ 33 | a function to copy the image directory and images from notebooks directory to website/docs directory 34 | website/docs/subdir/images must not exhist for the copy to work 35 | """ 36 | nb_dir = os.path.join(os.pardir, notebook_dir_name) 37 | docs_dir = os.path.join(os.pardir,'website',docs_dir_name) 38 | REG_nb_dir = re.compile((r'(\d\d)-*')) 39 | 40 | for dir in os.listdir(nb_dir): 41 | if REG_nb_dir.match(dir): 42 | if os.path.exists(join(nb_dir, dir, 'images')): 43 | scr = join(nb_dir, dir, 'images') 44 | dst = join(docs_dir, dir, 'images') 45 | if os.path.exists(dst): 46 | shutil.rmtree(dst) 47 | try: 48 | shutil.copytree(scr,dst) 49 | print("coppied the directory: {}".format(str(scr))) 50 | except: 51 | print("can't copy the directory: {}".format(str(scr))) 52 | else: 53 | print("no images folder in directory: {}".format(str(dir))) 54 | 55 | 56 | def main(): 57 | copy_figures_dir() 58 | copy_image_dirs() 59 | 60 | if __name__ == "__main__": 61 | main() 62 | -------------------------------------------------------------------------------- /conversion_tools/filter_links.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """A pandoc filter used in converting notebooks to Latex. 3 | Converts links between notebooks to Latex cross-references. 4 | """ 5 | import re 6 | 7 | from pandocfilters import toJSONFilter, applyJSONFilters, RawInline 8 | 9 | 10 | def convert_link(key, val, fmt, meta): 11 | if key == 'Link': 12 | target = val[2][0] 13 | # Links to other notebooks 14 | m = re.match(r'(\d+\-.+)\.ipynb$', target) 15 | if m: 16 | return RawInline('tex', 'Chapter \\ref{sec:%s}' % m.group(1)) 17 | 18 | # Links to sections of this or other notebooks 19 | m = re.match(r'(\d+\-.+\.ipynb)?#(.+)$', target) 20 | if m: 21 | # pandoc automatically makes labels for headings. 22 | label = m.group(2).lower() 23 | label = re.sub(r'[^\w-]+', '', label) # Strip HTML entities 24 | return RawInline('tex', 'Section \\ref{%s}' % label) 25 | 26 | # Other elements will be returned unchanged. 27 | 28 | 29 | def convert_links(source): 30 | return applyJSONFilters([convert_link], source) 31 | 32 | 33 | if __name__ == "__main__": 34 | toJSONFilter(convert_link) 35 | -------------------------------------------------------------------------------- /conversion_tools/make_mkdocs_yaml.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | This module contains functions and a main script to construct a mkdocs.yml file 5 | Two files are combined to make this file: 6 | 1. TOC.yml in the conversion_tools/ directory 7 | 2. mkdocs_config.yml in the webiste/ directory TOC yaml file for MkDocs 8 | The combined file is named: 9 | mkdocs.yml in the website/ directory 10 | 11 | book/ 12 | conversion_tools/ 13 | TOC.yml 14 | website/ 15 | mkdocs_config.yml 16 | mkdocs.yml 17 | 18 | """ 19 | 20 | import nbformat 21 | import os 22 | import re 23 | 24 | 25 | def combine_yaml(infile1=os.path.join(os.pardir, 'website', 'mkdocs_config.yml'), 26 | infile2=os.path.join(os.pardir, 'conversion_tools', 'TOC.yml'), 27 | outfile_name=os.path.join(os.pardir, 'website', 'mkdocs.yml')): 28 | # combine the files 29 | filenames = [infile2, infile1] 30 | with open(outfile_name, "w") as outfile: 31 | for fname in filenames: 32 | with open(fname, "r") as infile: 33 | outfile.write(infile.read()) 34 | 35 | 36 | def main(): 37 | config_file = os.path.join(os.pardir, 'conversion_tools', 'TOC.yml') 38 | TOC_file = os.path.join(os.pardir, 'website', 'mkdocs_config.yml') 39 | mkdocs_yaml_file = os.path.join(os.pardir, 'website', 'mkdocs.yml') 40 | combine_yaml(config_file, TOC_file, mkdocs_yaml_file) 41 | 42 | 43 | if __name__ == "__main__": 44 | main() 45 | -------------------------------------------------------------------------------- /conversion_tools/md_not_converted.tpl: -------------------------------------------------------------------------------- 1 | {%- extends 'basic.tpl' -%} 2 | 3 | 4 | {% block markdowncell scoped %} 5 | {{ cell.source | strip_files_prefix }} 6 | {%- endblock markdowncell %} -------------------------------------------------------------------------------- /conversion_tools/nb2mkdocs.py: -------------------------------------------------------------------------------- 1 | # nb2mkdocs.py 2 | # 3 | # a script to turn the notebook directory into 4 | # something ready for mkdocs to build into a static site 5 | # 6 | # set of steps from conversion_tools/README.md 7 | # 8 | ## To build website: 9 | 10 | import nb2html 11 | import copy_images_dir 12 | import yaml_TOC 13 | import make_mkdocs_yaml 14 | 15 | def main(): 16 | ### Convert notebooks to html that mkdocs can read 17 | 18 | #run main script in nb2html.py 19 | 20 | nb2html.main() 21 | 22 | ### Copy over all of the images from the notebooks/subdir to website/subdir 23 | 24 | #run main script in copy_images_dir.py 25 | 26 | copy_images_dir.main() 27 | 28 | 29 | ### Build the TOC yaml that goes at the end of the mkdocs config file 30 | 31 | # run main script in yaml_TOC.py 32 | 33 | yaml_TOC.main() 34 | 35 | ### Combine the TOC.yml file created above with the mkdocs_config file 36 | 37 | #run the main script in make_mkdocs_yaml.py 38 | 39 | make_mkdocs_yaml.main() 40 | 41 | if __name__ == "__main__": 42 | main() 43 | -------------------------------------------------------------------------------- /conversion_tools/templates/custom_colors.tplx: -------------------------------------------------------------------------------- 1 | %custom_colors.tplx 2 | 3 | \definecolor{stringred}{RGB}{186,33,33} 4 | \definecolor{commentteal}{RGB}{64,128,128} 5 | \definecolor{darkgreen}{RGB}{0,128,0} 6 | \definecolor{cm-keyword}{HTML}{008000} %jupyter notebook keyword color 7 | \definecolor{cm-builtin}{HTML}{008000} %jupyter notebook built-in function color 8 | \definecolor{cm-number}{HTML}{008800} %jupyter notebook number color 9 | \definecolor{cm-string}{HTML}{BA2121} %jupyter notebook string color 10 | \definecolor{cm-operator}{HTML}{AA22FF} %jupyter notebook operator color 11 | \definecolor{cm-comment}{HTML}{408080} %jupyter notebook comment color 12 | 13 | % end custom_colors.tplx 14 | -------------------------------------------------------------------------------- /conversion_tools/templates/environments.tplx: -------------------------------------------------------------------------------- 1 | %environments.tplx 2 | 3 | \newenvironment{problems}{}{} %keep regular one column formatting in problems environment. Long table would not output in two col mode 4 | % \newenvironment{problems}{\begin{multicols}{2}}{\end{multicols}} %an environment for the review question sections, where two columns are shown instead of one column everywhere else. Depends on the logic looking for latex environment problems in notebook cell metadata. 5 | 6 | % in cell metadata 7 | %{ 8 | % "latex": { 9 | % "environment": "problems" 10 | % } 11 | %} 12 | 13 | \newenvironment{key_terms}{\begin{multicols}{3}}{\end{multicols}} %an environment for the key_terms and concepts sections, where three columns are shown instead of one column everywhere else. Depends on the logic looking for latex environment key terms in notebook cell metadata. 14 | 15 | % in cell metadata 16 | %{ 17 | % "latex": { 18 | % "environment": "key_terms" 19 | % } 20 | %} 21 | 22 | % to put a \new page before the cell in question. Add the json below to the cell metadata. 23 | 24 | % in cell metadata 25 | %{ 26 | % "latex": { 27 | % "before_cell": "newpage" 28 | % } 29 | %} 30 | 31 | 32 | % to put a \newpage after the cell in question. Add the json below to the cell metadata. 33 | % in cell metadata 34 | %{ 35 | % "latex": { 36 | % "after_cell": "newpage" 37 | % } 38 | %} 39 | 40 | % end environments.tplx 41 | -------------------------------------------------------------------------------- /conversion_tools/templates/noprompts.tplx: -------------------------------------------------------------------------------- 1 | % extend the default article template: 2 | ((* extends 'article.tplx' *)) 3 | 4 | % display input without prompts: 5 | ((* block input scoped *)) 6 | \begin{Verbatim}[commandchars=\\\{\}] 7 | ((( cell.source | highlight_code(strip_verbatim=True) ))) 8 | \end{Verbatim} 9 | ((* endblock input *)) 10 | 11 | % treat execute_result (output with prompt) as display_data (output without prompt) 12 | ((* block execute_result scoped *)) 13 | ((* block display_data scoped *)) 14 | ((( super() ))) 15 | ((* endblock display_data *)) 16 | ((* endblock execute_result *)) -------------------------------------------------------------------------------- /notebooks/00-Preface/00.02-Acknowledgments.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Acknowledgments" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "The creation of this book and supporting material would not be possible without the gracious support of my wife and family. Students at Portland Community College continue to give me hope that the next generation of engineers will be a diverse group of team problem solvers.\n", 15 | "\n", 16 | "_The Python Data Science Handbook_ and _Machine Learning in Python_ as well as _Reiman Equations in Python_ served as inspiration and examples of using Jupyter notebooks to construct a book. The _bookbook_ repository on GitHub provided a starting point for the tooling used to convert this book from Jupyter notebooks into a website and into LaTeX for printing." 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": null, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [] 25 | } 26 | ], 27 | "metadata": { 28 | "kernelspec": { 29 | "display_name": "Python 3", 30 | "language": "python", 31 | "name": "python3" 32 | }, 33 | "language_info": { 34 | "codemirror_mode": { 35 | "name": "ipython", 36 | "version": 3 37 | }, 38 | "file_extension": ".py", 39 | "mimetype": "text/x-python", 40 | "name": "python", 41 | "nbconvert_exporter": "python", 42 | "pygments_lexer": "ipython3", 43 | "version": "3.7.4" 44 | } 45 | }, 46 | "nbformat": 4, 47 | "nbformat_minor": 2 48 | } 49 | -------------------------------------------------------------------------------- /notebooks/00-Preface/00.05-Errata.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Errata" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Errata including any typos, code errors and formatting inconsistencies can be submitted to:\n", 15 | "\n", 16 | " > errata@problemsolvingwithpython.com\n", 17 | " \n", 18 | "Please include the chapter number and section number in your email. Thank-you in advance for helping improve this text for future readers." 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": null, 24 | "metadata": {}, 25 | "outputs": [], 26 | "source": [] 27 | } 28 | ], 29 | "metadata": { 30 | "kernelspec": { 31 | "display_name": "Python 3", 32 | "language": "python", 33 | "name": "python3" 34 | }, 35 | "language_info": { 36 | "codemirror_mode": { 37 | "name": "ipython", 38 | "version": 3 39 | }, 40 | "file_extension": ".py", 41 | "mimetype": "text/x-python", 42 | "name": "python", 43 | "nbconvert_exporter": "python", 44 | "pygments_lexer": "ipython3", 45 | "version": "3.6.8" 46 | } 47 | }, 48 | "nbformat": 4, 49 | "nbformat_minor": 2 50 | } 51 | -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/Anaconda_download_linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/Anaconda_download_linux.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_agree_to_license.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_agree_to_license.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_download_mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_download_mac.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_download_mac_ask_for_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_download_mac_ask_for_email.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_download_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_download_page.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_downloading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_downloading.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_enter_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_enter_email.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_from_start_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_from_start_menu.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_install_linux_copy_link_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_install_linux_copy_link_address.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_installer_advanced_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_installer_advanced_options.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_installer_click_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_installer_click_next.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_path2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_path2.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_prompt.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_python3_or_python2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_python3_or_python2.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_run_installer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_run_installer.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_select_windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_select_windows.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/anaconda_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/anaconda_window.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/conda_import_this.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/conda_import_this.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/conda_import_this_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/conda_import_this_output.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/conda_in_windows_start_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/conda_in_windows_start_menu.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/conda_prompt_type_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/conda_prompt_type_python.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/conda_type_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/conda_type_python.png -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/python_dot_org_macos_download.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/python_dot_org_macos_download.PNG -------------------------------------------------------------------------------- /notebooks/01-Orientation/images/python_dot_org_windows_download.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/01-Orientation/images/python_dot_org_windows_download.PNG -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/hello.py: -------------------------------------------------------------------------------- 1 | # hello.py 2 | 3 | print('This code was run from a separate Python file') 4 | print('Hello from the file hello.py') -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/Anaconda_Prompt_Jupyter_Notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/Anaconda_Prompt_Jupyter_Notebook.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/Jupyter_Home_Browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/Jupyter_Home_Browser.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/anaconda_navigator_jupyter_notebook_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/anaconda_navigator_jupyter_notebook_launch.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/anaconda_navigator_jupyter_notebook_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/anaconda_navigator_jupyter_notebook_start.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/anaconda_start_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/anaconda_start_menu.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/change_cell_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/change_cell_type.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/click_change_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/click_change_name.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/code_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/code_cell.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/downloading_complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/downloading_complete.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/engineering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/engineering.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/file_download_as_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/file_download_as_notebook.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/file_make_a_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/file_make_a_copy.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/insert_cell_above.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/insert_cell_above.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_anaconda_prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_anaconda_prompt.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_dot_py_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_dot_py_file.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_example.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_export_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_export_options.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_markdown_cells_as_comments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/jupyter_notebook_markdown_cells_as_comments.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/kernel_restart_and_clear_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/kernel_restart_and_clear_output.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/markdown_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/markdown_cell.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/new_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/new_notebook.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/new_notebook_from_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/new_notebook_from_browser.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/notebook_file_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/notebook_file_browser.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/notebook_file_browser_click_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/notebook_file_browser_click_folder.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/notebook_file_browser_click_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/notebook_file_browser_click_notebook.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/notebook_json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/notebook_json.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/output_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/output_cell.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/rename_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/rename_dialog.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/rename_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/rename_notebook.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/rename_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/rename_window.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/run_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/run_cell.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/run_import_this.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/run_import_this.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/save_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/save_notebook.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/windows_start_anaconda_navigator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/windows_start_anaconda_navigator.png -------------------------------------------------------------------------------- /notebooks/02-Jupyter-Notebooks/images/windows_start_jupyter_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/02-Jupyter-Notebooks/images/windows_start_jupyter_notebook.png -------------------------------------------------------------------------------- /notebooks/04-Data-Types-and-Variables/images/reverse_string_indexing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/04-Data-Types-and-Variables/images/reverse_string_indexing.png -------------------------------------------------------------------------------- /notebooks/04-Data-Types-and-Variables/images/reverse_string_indexing.xml: -------------------------------------------------------------------------------- 1 | 1ZhdT4MwGIV/DZdLaDvYduuc0wtNDCZeN/AOmhRKuk6Yv95OWgd2Jho1lBvSnpZ+PD0hnAZkXbZbSeviXmTAAxxmbUCuA4yXi5V+noRjJ8Rx1Am5ZFknobOQsFcwYmjUA8tgP+iohOCK1UMxFVUFqRpoVErRDLvtBB/OWtMcHCFJKXfVZ5apwmwrCs/6LbC8sDOj0LSU1HY2wr6gmWh6EtkEZC2FUF2pbNfAT+wsl+69my9aPxYmoVLfeeF6RY85ytuyfIQbxp+2s4dkZkZ5ofxgNvwAOVXsBbR6V2XQmsWroyXSFExBUtP0VG/0oQfkqlAl1zWki3Rfd+ewYy3oqa/cddpJQSpoe5JZ9xZECUoedRfrIoPQeAhZ+k3vRIxU9A7DatR4IP8Y+IxJFwypH1DDDrV1QSVNFUgPcWEyMi7i4Jotf81pJyplPhc4/htuKPbMZ3MHXDIFbqMbLnINt/ARHJ57ZrjYASemwG10wy1cw8U+giPYM8MtHXB8CtxGN9zKNVzkI7h56JnhbK7okTtMAdzojkNuVLD/J56R8y0tIDcuqCmAG99yF4ID8ZFc5FtwQG5yYFMAN77lLkQH7CO52LfogCaSHT6DG99yF8ID8pHcwrfwgNz0UE0B3D9aTlfPN8rvbb1rebJ5Aw== -------------------------------------------------------------------------------- /notebooks/04-Data-Types-and-Variables/images/string_indexing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/04-Data-Types-and-Variables/images/string_indexing.png -------------------------------------------------------------------------------- /notebooks/04-Data-Types-and-Variables/images/string_indexing.xml: -------------------------------------------------------------------------------- 1 | 1Zhda4MwGIV/jZcFk1Tb3rbdul1sMBzsOmiqgWgkTafdr186Y6u8FDa2YXIjyUnMx/MehGNANmW7U7QunmTGRIDDrA3INsB4uViZ51k4dUIcR52QK551EroKCf9gVgyteuQZO4wmaimF5vVYTGVVsVSPNKqUbMbT9lKMd61pzoCQpFRA9Y1nurDXisKr/sB4XvQ7o9COlLSfbIVDQTPZDCRyF5CNklJ3rbLdMHFm13Pp3ru/MXo5mGKV/s4L2xU95Shvy/KF3XPxups9JzO7yjsVR3vhTUEVTTVT9tT61KNoCq5ZUtP03G9MtQOyLnQpTA+ZJj3UXQH2vGVmz7VdminN2ptnRhcSxkFMlkyrk5nS28eys+ZBPfZmUAorFYMq9Bq1xc8vC1/5mIZF9ANcGOB6rDJzO/dQYTIxKgJQJb/GtJeVtp8IHP8NNhQ7ZrE54Bb6wG1yv0WAm3SRG5475rcYcEM+cJvcbwvATbjIjWDH/LYE3LAP3Cb32wpwO7rIbR465rc+SAzAER/ATW44BLOBdhKcayEBwZQw9wHc9I6DmYG7CC5yLTMgGBoiH8BN7zhPUkPsWmpAMDbEPoCb3nEwN1Quglu4lhsQDA4LH8D9o+NM9/r7+Gts8A+e3H0C -------------------------------------------------------------------------------- /notebooks/05-NumPy-and-Arrays/05.00-Introduction.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# NumPy and Arrays" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Introduction" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "latex": { 21 | "after_cell": "newpage" 22 | } 23 | }, 24 | "source": [ 25 | "By the end of this chapter you will be able to:\n", 26 | "\n", 27 | " * Explain the difference between a Python list and a NumPy array\n", 28 | "\n", 29 | " * Create NumPy arrays\n", 30 | " \n", 31 | " * Modify NumPy arrays\n", 32 | " \n", 33 | " * Index NumPy arrays\n", 34 | " \n", 35 | " * Run mathematical operations on NumPy arrays\n", 36 | " \n", 37 | " * Solve a system of linear equations using matrices" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": null, 43 | "metadata": {}, 44 | "outputs": [], 45 | "source": [] 46 | } 47 | ], 48 | "metadata": { 49 | "kernelspec": { 50 | "display_name": "Python 3", 51 | "language": "python", 52 | "name": "python3" 53 | }, 54 | "language_info": { 55 | "codemirror_mode": { 56 | "name": "ipython", 57 | "version": 3 58 | }, 59 | "file_extension": ".py", 60 | "mimetype": "text/x-python", 61 | "name": "python", 62 | "nbconvert_exporter": "python", 63 | "pygments_lexer": "ipython3", 64 | "version": "3.6.8" 65 | } 66 | }, 67 | "nbformat": 4, 68 | "nbformat_minor": 2 69 | } 70 | -------------------------------------------------------------------------------- /notebooks/05-NumPy-and-Arrays/05.01-NumPy.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## NumPy" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "NumPy is a Python package used for numerical computation. NumPy is one of the foundational packages for scientific computing with Python. NumPy's core data type is the array and NumPy functions operate on arrays." 15 | ] 16 | } 17 | ], 18 | "metadata": { 19 | "kernelspec": { 20 | "display_name": "Python 3", 21 | "language": "python", 22 | "name": "python3" 23 | }, 24 | "language_info": { 25 | "codemirror_mode": { 26 | "name": "ipython", 27 | "version": 3 28 | }, 29 | "file_extension": ".py", 30 | "mimetype": "text/x-python", 31 | "name": "python", 32 | "nbconvert_exporter": "python", 33 | "pygments_lexer": "ipython3", 34 | "version": "3.6.8" 35 | } 36 | }, 37 | "nbformat": 4, 38 | "nbformat_minor": 2 39 | } 40 | -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/06.00-Introduction.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Plotting with Matplotlib" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Introduction" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "latex": { 21 | "after_cell": "newpage" 22 | } 23 | }, 24 | "source": [ 25 | "By the end of this chapter you will be able to:\n", 26 | "\n", 27 | " * Import Matplotlib into a Python script or Jupyter notebook\n", 28 | "\n", 29 | " * Construct line plots with Matplotlib\n", 30 | "\n", 31 | " * Use Matplotlib's object-oriented interface\n", 32 | "\n", 33 | " * Construct bar charts and pie charts with Matplotlib\n", 34 | "\n", 35 | " * Add error bars to bar charts and line plots\n", 36 | "\n", 37 | " * Plot histograms\n", 38 | " \n", 39 | " * Make box plots and violin plots\n", 40 | "\n", 41 | " * Plot contours\n", 42 | " \n", 43 | " * Create quiver plots and stream plots\n", 44 | "\n", 45 | " * Construct 3D mesh grid plots\n" 46 | ] 47 | }, 48 | { 49 | "cell_type": "code", 50 | "execution_count": null, 51 | "metadata": {}, 52 | "outputs": [], 53 | "source": [] 54 | } 55 | ], 56 | "metadata": { 57 | "kernelspec": { 58 | "display_name": "Python 3", 59 | "language": "python", 60 | "name": "python3" 61 | }, 62 | "language_info": { 63 | "codemirror_mode": { 64 | "name": "ipython", 65 | "version": 3 66 | }, 67 | "file_extension": ".py", 68 | "mimetype": "text/x-python", 69 | "name": "python", 70 | "nbconvert_exporter": "python", 71 | "pygments_lexer": "ipython3", 72 | "version": "3.6.8" 73 | } 74 | }, 75 | "nbformat": 4, 76 | "nbformat_minor": 2 77 | } 78 | -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/3_quiver_plots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/06-Plotting-with-Matplotlib/3_quiver_plots.png -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/bar_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/06-Plotting-with-Matplotlib/bar_plot.png -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/bar_plot_with_error_bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/06-Plotting-with-Matplotlib/bar_plot_with_error_bars.png -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/images/3_quiver_plots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/06-Plotting-with-Matplotlib/images/3_quiver_plots.png -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/images/bar_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/06-Plotting-with-Matplotlib/images/bar_plot.png -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/images/bar_plot_with_error_bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/06-Plotting-with-Matplotlib/images/bar_plot_with_error_bars.png -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/images/plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/06-Plotting-with-Matplotlib/images/plot.png -------------------------------------------------------------------------------- /notebooks/06-Plotting-with-Matplotlib/plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/06-Plotting-with-Matplotlib/plot.png -------------------------------------------------------------------------------- /notebooks/07-Functions-and-Modules/myfunctions.py: -------------------------------------------------------------------------------- 1 | # myfunctions.py 2 | 3 | def plustwo(n): 4 | out = n + 2 5 | return out 6 | 7 | 8 | def falldist(t,g=9.81): 9 | d = 0.5 * g * t**2 10 | return d -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/08.00-Introduction.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# If Else Try Except" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Introduction" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "latex": { 21 | "after_cell": "newpage" 22 | } 23 | }, 24 | "source": [ 25 | "In computer programming, selection structures run sections of code based on logical conditions. In this chapter you will learn about the selections structures if, else, and else if. The end of the chapter introduces another selection structure, the try / except block.\n", 26 | "\n", 27 | "By the end of this chapter you will be able to:\n", 28 | "\n", 29 | " * Utilize Python's ```input()``` function\n", 30 | "\n", 31 | " * Use if, else if, and else selection structures\n", 32 | " \n", 33 | " * Explain the difference between syntax errors and exception errors\n", 34 | " \n", 35 | " * Use try-except statements\n", 36 | " \n", 37 | " * Construct flowcharts to describe the flow of a Python program" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": null, 43 | "metadata": { 44 | "collapsed": true 45 | }, 46 | "outputs": [], 47 | "source": [] 48 | } 49 | ], 50 | "metadata": { 51 | "kernelspec": { 52 | "display_name": "Python 3", 53 | "language": "python", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "codemirror_mode": { 58 | "name": "ipython", 59 | "version": 3 60 | }, 61 | "file_extension": ".py", 62 | "mimetype": "text/x-python", 63 | "name": "python", 64 | "nbconvert_exporter": "python", 65 | "pygments_lexer": "ipython3", 66 | "version": "3.7.3" 67 | } 68 | }, 69 | "nbformat": 4, 70 | "nbformat_minor": 2 71 | } 72 | -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_calculation_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/08-If-Else-Try-Except/images/flow_chart_calculation_program.png -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_calculation_program.xml: -------------------------------------------------------------------------------- 1 | 5Vhtb9owEP41fKwU4oTCx0Jpt2nVkFrt5dNkyJF4NXHmOAX263dOnATXoaVSoVpnich5fI7v7vGTM+mRyWpzLWmW3IgIeM/3ok2PXPZ8f3g+wqsGthUwGIQVEEsWVVC/BW7ZHzCgZ9CCRZBbhkoIrlhmgwuRprBQFkalFGvbbCm4vWpGY3CA2wXlLvqNRSoxYYVei38AFif1yn3PjKxobWyAPKGRWO9AZNojEymEqnqrzQS4zl2dl2re1Z7RxjEJqTpkgmK/VTpIp97ocn5x9fPrl2E4Ojs3vqltHTBEGL+5FVIlIhYp5dMWHUtRpBHop3p4l6gVx24fu79Aqa2hkBZKINQ+4bMQmbFbilRNBBeyXJFclQ3xXElx36QZEzR2YzRh56KQC3giMGOno9mZaDJzDWIFSm7RQAKnij3YbFOzaeLGrpk6Ewxd8T2zv/16I5jt3ezb+hGKyhiUmdWyg50dN1qo5OwF/BmHHygvTAg5rqhcVjlHxWj21glTcJvRMntr1KzNocvBPraWjHMLJ9iMfb2BOjZp7TFIBZsnqalHR3aK69t1K8d+rbFkR4pDbz+ZFg0vzfnwvWrGfxvNEP+0mvEdzVzk9wgUOciyROgrxV9arOYaesQ2vsgz3cUUU86Bi1jSFSY+A8nQN5CPx2btwNHkNxoRUuFHll9Tz57T3+BY+gsd/u5g477ylAat5ErI2R86Lw20DDO9w0rvwnEvvEREKzCvxKgnUM7iFPsclvpROmkMjwYXBlZaneMcyWRpfFdK9Sx4grJXYCMMiK2d0HfYCDrIeCyxVyNj4JABafSey08YnLD+fHzYsvmnG/p9RsIAZnOVj36ckbeoP4cT01lEni1InZGepv4Ex6s/+6Oy60+EkvGq/zb6ksD+6mMzeZCcdljyytbNpy0o3ZqC0ilAV2iOqjpoP1hohLivtqMVmk6igv9GaP5JhBaS0wrNPejNZOVgpTA8DxTcPTj8c+e7V5VdQAZHkx3ett87Kpbbj0Zk+hc= -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_more_complex_user_input_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/08-If-Else-Try-Except/images/flow_chart_more_complex_user_input_program.png -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_more_complex_user_input_program.xml: -------------------------------------------------------------------------------- 1 | 7Vpdc5s4FP01fswOIMDmMY6ddKbtbGfT2U2eOrKRQVmBqJBru79+JSSBsXA+GoOzmXomGekiQLrnnnOvZI/AVba9YbBIP9MYkZHnxNsRmI08bzKOxH9p2ClDGAbKkDAcK5PbGG7xT6SNjraucYzK1kBOKeG4aBuXNM/RkrdskDG6aQ9bUdJ+awETZBlul5DY1n9wzFO9rMBp7B8QTlLzZtfRVzJoBmtDmcKYbvZMYD4CV4xSrlrZ9goR6TvjF3Xf9ZGr9cQYyvlzbuD4O8/DfO5Es8Xl9be//5wE0cVYz43vzIJRLNavu5TxlCY0h2TeWKeMrvMYyac6opfyjIimK5oPiPOdhhCuORWm5gmfKC30uBXN+RUllFVvBNfVR9hLzui/tZuFg6b2GvWyS7pmS/TIwvQ4uZq9G7VnbhDNEGc7MYAhAjn+0UYb6qBJ6nH1rV8oFlPxHB3fngkEHd513JpHcMgSxPVdDTqisTeNxlRh9gL89IR/QLLWSyjFG7mNKiGCMRK9TYo5ui1g5b2N4GwbQxuDY2itMCEtOxAfPd4EUEeQmhkjxtH2UWjM1ajtYtPdNHR0DcfSPSpOnONgtmB4qc8n75Uz3nk4A7xhOeNZnCmYmuDIC7+vpR5P5zlHTE5J/OXrbCE75poFv1D2QjaFzyEhiNCEwUwMLBDDYrKIHV770lzojY9RBICy98zHOsE9RciwL0IGFqBf0dbWQC6NLecyVOKfcFENkLwsZMhVswumo2AmLJKSpWKnvAESnOSiTdBKPko6DYta4VKbuaTrtBRg4jz5WnH3wn8EshOgEfigTabAs9DwO8A45NzJwAgtMFAev+d8NAbnTkiubxOAidYZ0tSTcDnV51VpKhomTYHDNDX2hi3tbFm7hqQ8Kaxoi/mdNP8R6N59b4ALnNnuTs+h6tzXb351MCgsHvPmmTYE/mHWOxI1l4zB3d4wnYp6iKvICiu8UlWOqoBgJiU4UZWO2c3uhRtLabZYl8+V7q5Q6Aiatng7ThRVI3vMnPVWzfAb2JlzMqSMe8H/ldq/Tl+DQe+0nBzQEoSvpGX3e3yv+z1NXKgnnjZTOBal93Y0RDJ5IfcvmtNmH3PDEFS7HJ7CXHH99x6nO/f7tja4XWX1KfY4D3cP+K9yVjJ0v5jeMu/jh4xcgGG0oU7SdUcl6XHQo3AckP8XDy+AXQl0evIkAvNaXQhDt39dMC55oS58QmX5WxSeFgW/6ySyL1HoFv6JBXBvWwR3TymUbrypOuJM5X049Hm/feDfVb2Tt129x5ihJcdUnpkJaOVz+qjo/YlN0EErendsoaUOZmzxfZ9HNUPR8lCag/6+UuisKbxhqrO3UoD1V1c9KbjjgZG19fY5JdSM5ug91U2WBneEyPED84O9d9j1hdGJ6ibRbX5RoWKg+VkKmP8H -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_simple_print_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/08-If-Else-Try-Except/images/flow_chart_simple_print_program.png -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_simple_print_program.xml: -------------------------------------------------------------------------------- 1 | 5VZNc5swEP0tPXDMDEaG2Mf4qz20k8w40x47ilmDWoGIWGI7v74rEGCF2m1m4hxaDoz0tCut9u2T5LF5tv+oeZF+UTFIL/DjvccWXhBMrqf0N8ChAaIobIBEi7iBRj2wFs9gQd+ilYihdAxRKYmicMGNynPYoINxrdXONdsq6a5a8AQGwHrD5RD9JmJM7bZCv8c/gUjSduWRb0cy3hpboEx5rHZHEFt6bK6VwqaV7ecgTe7avDR+qxOjXWAacvwbBxSPmEf50p8uHm5W37/eTsLp1bWNDQ/thiGm/duu0piqROVcLnt0plWVx2Bm9amXYiapOaLmD0A8WAp5hYqgfobPShXWbqtynCupdL0iW9Uf4SVq9bNLMyVo1kRnQjq5aQuVqtIbOLPTUZdyKlVQGaA+kJ8GyVE8ufNzWzRJZ9e53ilBKwe+re+gLQRb3l3dtlMg1wmg9erZocZRGD1Uc/YK/mzAT1xWdgslrYhDVqUkxRj2dqlAWBe8TtaONOtyOOTgFFtbIaWDM/qsfVtAbXigEfbnKRxS0zpM3RS33V0vx1GrsfRIihP/NJkODa/N+eS/0UzwLpphwftqJhhoptBNgF4QPVbmPJ7dVlhU+KEHBpzTcV6YJuWVSwlSJZpnZFiAFhQh6Jdjd/3AxUQ4nTLW4BcWYXer/UmF0aVUGA5YvIf98OBDAzrJ1VCKZ/5QGxgxFqbO6ujCmRcuCDE6LBtJGgcuRZJTW8LWTGXyKOiBcGNhNBqdlUSmyJP7WrBX4zOUvQEb4Zi5CgqDARvj35DxUmhvRkY0IAPy+F++hBi73C1E3f5V2Bx6/dOaLX8B -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_simple_user_input_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/08-If-Else-Try-Except/images/flow_chart_simple_user_input_program.png -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_simple_user_input_program.xml: -------------------------------------------------------------------------------- 1 | 7Vhdb5swFP01eewEGNLw2KRJ97BplVpt7dPkBAe8GUyNaZL++tnYhhCTfqwhmbYhtbKPv6597rnXzgBM0vUVg3nymUaIDDwnWg/A5cDzRueh+C+BjQKGw0ABMcORgtwGuMFPSIOORkscoaLVkVNKOM7b4IJmGVrwFgYZo6t2tyUl7VVzGCMLuFlAYqPfcMQTva3AafCPCMeJWdl1dEsKTWcNFAmM6GoLAtMBmDBKuSql6wki8uzMuahxsz2ttWEMZfw1Azh+4Nkwmzrh5fxi9v3rl1EQnp1r2/jGbBhFYv+6ShlPaEwzSKYNOma0zCIkZ3VELeEpEUVXFH8gzjeaQlhyKqBmhk+U5rrfkmZ8Qgll1YpgVn0CLzijP+tjFgc0VtZJk/ZuWkMFLdkCPbNTtz5y4aqIpoizjRjHEIEcP7bnh9pp4rpfPfSaYrGy52j/9owjaPeu/dZMwSGLEdejGnZEYcuMBqo4ewN/2uBHSEq9hUKsyG1WCRGKkeytEszRTQ6rw1oJzbY5tDnYx9YSE9LCgfh0f+NAxjzEOFo/T6FNjRkQto/YVFeNHF2jsWRLiiNnP5ktGt565qN/RjPeUTQDvONqxrM0kzNl4MAbPpQyHo+nGUdMmiT+sjKdy4pps+gXkT2XRXHEkBBEaMxgKjrmiGFhLGK7bddNQ296DEMAFN6zHusE95Igh30JMrAIvUVrOwZyCbYOl6ECP8F51UHqMpcuV1kXjAfBpUCkJAulTjkAEhxnokzQUk4lzxGLu8KFhrmU67gQZOIsvq20e+Y/Q9kB2Ah80BZT4Fls+B1k7GruYGQMLTJQFv3N+ShwTp2QXN8WABOlE6SpF+lyqu+waSrsJU2B3TR17h33ameHtRkkxUFpRWvM7yT8IdC1+94IF7SyzZ22oarc1yv/8c6we2fxd8W8xxkuGIObrW46w/TgLqHlLXipLi/qYgNTGVljdYExIWvLi1hC03lZvDYidzHc4QvtmOw4YVj17DEh1i8wI1tgJ8TRMaOzd5I39kkCset0U/PeSAx2Mq7/XvF1r+O73es07KsZDxvmHUu4W88RIvU6l48PrVzzCLliCKonCk9gphT9/4HSnbh9OwK4XXfi33igiGrzC55yieZnUDD9BQ== -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/flow_chart_user_input_program.xml: -------------------------------------------------------------------------------- 1 | 7Vldb5swFP01eezEd+CxSZPuYdMqtdrap8kJDngzmBqnSfrrZ2MDISZpqgaWbo3Uyj74C5977r02A3ucrK8pyOKvJIR4YBnhemBfDSzLHwb8vwA2EvA8VwIRRaGEzBq4Rc9QgYZClyiEeaMhIwQzlDXBOUlTOGcNDFBKVs1mC4Kbs2YgghpwOwdYR3+gkMXqtVyjxj9DFMXlzKahniSgbKyAPAYhWW1B9mRgjykhTJaS9RhisXflvsh+0z1Pq4VRmLJjOjD0yFIvnRjB1exy+vP7N98NLoZqbWxTvjAM+furKqEsJhFJAZ7U6IiSZRpCMarBazFLMC+avPgLMrZRFIIlIxyqR/hCSKbaLUjKxgQTWsxoT4sfx3NGye9qm/kGjeTqxJL2vrSCcrKkc3jgTc1qy7mpQpJARje8H4UYMPTUHB8oo4mqdlXXG4L4zJah7NsqDUGZd2W35RAM0Agy1atmhxe2llFDBWev4E8t+AngpXqFnM/IdFYx5ooR7K1ixOBtBorNWnHNNjnUOdjH1gJh3MBt/lPtSwMqlwcpg+vDFOrUlB2C5haX1VUtR7PUWLwlRd/YT2aDhtfuuf/faMbqRTO21a9mLE0zGZULHFje41L449EkZZCKJfG/dJnMRKV8ptHPPXsminyLAcYQk4iChDfMIEV8sZDuPrupH3SmxyCwbYl3rMcqwL0kSK8rQboaoXdwrftAJsDG5lKYo2cwKxoIXWbC5IrVuaOBe8URIclcqlN0ABhFKS9juBBDiX1EPFe4VDATch3lnEyURneFdi+cA5SdgA3XsZtici2NDaeFjF3NnYwMTyMDpuG/HI+8Y+2/s4BkOroAKC/9hTD1Il1G8TttmAo6CVP2bpgaWv2mdrpbmwKcn5RWuEbsXsCfXFV76IxwTivd3Ks1FJWHauZTGwM/JBbkHNrefg4Ezm7U22M1l5SCzVYzFYo6sKtAMyu0kFmOzIBAIlxwJDOd8jS7ZW40JslsmR/ruttMocVoms7bMIKgaNlh5KyOaqW+bT1y+n26cct9r9I+oXxNo520t8rS35Gl7b1Rlu3zOFb7PLVdyBFPGykMTdJbJxoslDwT5xel6fIcc00hkKccFoNUav3jjNMe+x3dN5htaXVnZxzLOe90br+7qeJ+Vekk7lv2kYHf6yZb3BG+N+z5UsP+8AHd+gCn7eKxVx9g+hrHnZ0IzC0VS62ed9rQTzbv9X29r9/vv8NkPUQUzhki4oqMMynG6SKBd3xdoL0m8OZQY0vew+j+95xD+fnLctc1uyf7gsCr9RdZ2bz+rG1P/gA= -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/four_flow_chart_shapes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/08-If-Else-Try-Except/images/four_flow_chart_shapes.png -------------------------------------------------------------------------------- /notebooks/08-If-Else-Try-Except/images/four_flow_chart_shapes.xml: -------------------------------------------------------------------------------- 1 | xZZNj5swEIZ/DcdKBIc0HDdf20vVSlm1x8oLE7BqbGqGJtlf3zGYEOKs9kNN6wOy3zFj+31sQ8CW5eHe8Kr4rDOQQRRmh4Ctgiiaf0zoaYVjJ8xmcSfkRmSdNBmErXgCJ4ZObUQG9agjai1RVGMx1UpBiiONG6P34247LcejVjwHT9imXPrqd5Fh4ZYVh4P+CURe9CNPQhcped/ZCXXBM70/k9g6YEujNXa18rAEab3rfene2zwTPU3MgMLXvIDiF6qZWofJ6vFu8+Pbl3mcfHBZfnPZuAXXyA0GNteGnqAyN3s89pZQWnKfGot9IRC2FU9tZE/8SSuwlNSaULVGo3+ebKMFL3Za4VJLbdpMbNMWqwspRzqj4vpv3chXFtzPHgzC4UxyBtyDLgHNkbr00cTBcLuxb+4HtJOeV3GGde407nZTfso8GE4V5/kb/I88/4WqmsF/3WDbvEBAe6myVTKDSwlS54aX5FcFRtDEwFzGvg6Bm1FLEsY6/cbUTkfqJWyzW2FjHja6MdJGchRa1R4uoxuVgU0Yvsv/sc+2XPH5eU43QMDY/0Yw9W8ukPQFIACt+aZJsTHgsyh0+djU7z0Hr/H7glcYJkkY/h0Op++i4zCd+hzm//ICiz0MD3DwLyy04sheA7V44o9tB2tOpYXCdnbxIohXpPAGdd39ENgXuBS5orqEnU1lPRN06u6cjNryqwmnUPmDbaxoj9z0UMRTNj4UceTBmF6BEb0dBjWHP4U2dva7xdZ/AA== -------------------------------------------------------------------------------- /notebooks/09-Loops/09.00-Introduction.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Loops" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Introduction" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "latex": { 21 | "after_cell": "newpage" 22 | } 23 | }, 24 | "source": [ 25 | "Repetition structures allow the same piece of code to run multiple times. Two repetion structures in Python are for loops and while loops. For loops run a set number of times. While loops run as long as a specific logical condition is true.\n", 26 | "\n", 27 | "By the end of this chapter you will be able to:\n", 28 | "\n", 29 | " * use a while loop \n", 30 | " \n", 31 | " * use a for loop\n", 32 | " \n", 33 | " * use the break statement\n", 34 | " \n", 35 | " * use the continue statement\n", 36 | " \n", 37 | " * construct flowcharts that describe programs with loops" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": null, 43 | "metadata": {}, 44 | "outputs": [], 45 | "source": [] 46 | } 47 | ], 48 | "metadata": { 49 | "kernelspec": { 50 | "display_name": "Python 3", 51 | "language": "python", 52 | "name": "python3" 53 | }, 54 | "language_info": { 55 | "codemirror_mode": { 56 | "name": "ipython", 57 | "version": 3 58 | }, 59 | "file_extension": ".py", 60 | "mimetype": "text/x-python", 61 | "name": "python", 62 | "nbconvert_exporter": "python", 63 | "pygments_lexer": "ipython3", 64 | "version": "3.7.3" 65 | } 66 | }, 67 | "nbformat": 4, 68 | "nbformat_minor": 2 69 | } 70 | -------------------------------------------------------------------------------- /notebooks/09-Loops/images/flow_chart_of_program_that_contains_a_for_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/09-Loops/images/flow_chart_of_program_that_contains_a_for_loop.png -------------------------------------------------------------------------------- /notebooks/09-Loops/images/flow_chart_of_program_that_contains_a_for_loop.xml: -------------------------------------------------------------------------------- 1 | 3VhNc9owEP01HNMRsk3wMRCSdqZJM5NMmp46AgtbrWw5soghv74rW8YIGUoz0HbiQyI9rz523+6TTM8bp8trSfLkRkSU9zCKlj3vsofx8DyEvxpY1cBgENRALFlUQ/0WuGev1IDIoAsW0cIyVEJwxXIbnIksozNlYURKUdpmc8HtVXMSUwe4nxHuol9ZpBLjVoBa/CNlcdKs3EfmTUoaYwMUCYlEuQF5k543lkKoupUux5Tr2DVxqcdd7Xi73pikmTpkgGLPKhtkExReTi+uvj9+GQbh2bnZm1o1DtMI/DddIVUiYpERPmnRkRSLLKJ6VgS9RKUcmn1o/qBKrQyFZKEEQO0Mn4XIjd1cZGosuJDVit5V9QBeKCl+rsMMARq5Phq3C7GQM7rHMWOnvdkYaCJzTUVKlVyBgaScKPZis01M0sRru/XQO8FgKxiZ/MZNIpj0xgNkT6GIjKkyo1p2oLGxjRaqOPsD/syGXwhfGBcKWFG5rHIOFaPZKxOm6H1OquiVULM2hy4Hu9iaM84t3IPH2DcJ1JGkzY6pVHS5l5rmbWiHuOmWbTn2mxpLNkpxiHaTadGwJ+Z+ica34+ktHt9FN+L20yMryzPfiXmmh2QzSUkBWoXRVG+/75Jw+tL6LX2oetaltVUfb6s1fJrSGm6VFjqstC6kJKsNs1wbFLvX8cPuddoUqWc8at1iJ4dyWe+qhwfPC30mjDjQyrK4BZyEgiMl100gjXBOuYglScEwp5LBDqncfnfXvjiZEISh59X4kYXA97aICvFhSrCtyW9Rgk4WA4fFB7p0xVdp0AqupAV7JdPKQBejyVGwDka94BIQXeRFXe96AOEszqDN6VxPpYPG4JJyYWClBWBUAJmQMA+VGoBM7absCGwEvmex4QUuG34HGfhUZAwcMmgWveeD0B/865PQVTEQK5LqSGbTQv9DtaLVGK9FDGUdoD0MDMJjHp90ydTTRvubNvkQ/EcHa2d8T3Nn9bGdRx7GBx2sbzj7Or3yOu9P6xSITZY0X4Dv6wL1F3ne/jbx/ZN9m+z2yuJ5DkE05a/7+qIFX/OdxS4TkU4XxaE63UVQB5W2UiMUhpXl/mPSUegOkneK9vrW2lxazjsuLahDtPvb190DVBu67e8JNY3tjzLe5Bc= -------------------------------------------------------------------------------- /notebooks/09-Loops/images/flow_chart_of_program_that_contains_a_while_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/09-Loops/images/flow_chart_of_program_that_contains_a_while_loop.png -------------------------------------------------------------------------------- /notebooks/09-Loops/images/flow_chart_of_program_that_contains_a_while_loop.xml: -------------------------------------------------------------------------------- 1 | 3VjBcpswEP0ajs7IYLA5xo6ddqZJM5NM2p46spFBjUBEiGDn6yuBAAswcRI709QHj/RYwe6+fVqEYc3CzSWDcXBFPUQME3gbw7owTHMydsW/BLYF4Dh2AfgMewU0rIFb/IwUCBSaYg8lmiGnlHAc6+CKRhFacQ2DjNFMN1tToj81hj5qAbcrSNroD+zxQIVlgxr/grAflE8eAnUlhKWxApIAejTbgay5Yc0YpbwYhZsZIjJ3ZV6KdYs9VyvHGIr4IQs4fuSRE82Be7E8X/y+/z6x3cFY+ca3ZcDIE/GrKWU8oD6NIJnX6JTRNPKQvCsQs4CHRAyHYvgHcb5VFMKUUwHVd/hGaazs1jTiM0ooy59oLfKfwBPO6EOVZpGgaTtGFXZCU7ZCPYEpOxnNzkKVmUtEQ8TZVhgwRCDHTzrbUBWNX9lVS28oFq6YQNW3WRaCKm/TAfotOGQ+4mpVzY4Y7LhRQzlnr+BPOfwESapCSMQTeZtVQoRiJHtZgDm6jWGevUxoVuewzcE+ttaYEA23xE/ZlwXUUaSlx4hxtOmlprzq6ikeWmqe1XocliILdrQ4AfvZ1HjoSfooA7Pr2fLanN14V/T66z3OsoF9TNGgDeY/JXxmq9mvV8rpRcpA/qvk1NDE2/RlfoicrPHHyslsyQkmDwJIE8Ty7iH/oWE6RKRruhQzx5ejmCY4D9sEURoupXGjQsTuH8uhyDUkBBHqMxjKlYhh4TVizWs39YWTadZ1LavAj63ZSWNbHHdodtSh2eb2+RbNdjJrt5i9Q5v2PsklqCWXoQQ/w2VuAHKqRe3l3tlTw74QiNRmUshULoAE+5EYE7SWt5JJw+J94lzBXOp2mggyceTf5SIejHooOwIb9sjSVWWbLTa6yDBPRYbTIgNF3v/cs5yu+v/QnjVupTwypAMODGU28/1MAKDNwunfBw9vYEo2AnXf3M4609NP5wCcOXYpmne2OMtstDhwWIs7Zwxud8zUPrT/OY0SHFmN48EL9qVfddEVHjRWl+7Q9TpB7+3JndRM+ivX/xyVe/paPfKrl22f7NVrf1QH0SzSuWiRzQIaLtPk0GbRubm0ydTbBQCum1v29+pWm+igee9WUxVyKcNJR+cAHZ1j2NxHjtY6huYxpfXvn3e6k/AxqnNO9/2gJyxNdjErPBTSe0ypfropkUqW0TKJq0R/5uPOu0TbPO7YzumOO2JafzMsyqD+8GrN/wI= -------------------------------------------------------------------------------- /notebooks/09-Loops/images/four_flow_chart_shapes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/09-Loops/images/four_flow_chart_shapes.png -------------------------------------------------------------------------------- /notebooks/09-Loops/images/four_flow_chart_shapes.xml: -------------------------------------------------------------------------------- 1 | xZZNj5swEIZ/DcdKBIc0HDdf20vVSlm1x8oLE7BqbGqGJtlf3zGYEOKs9kNN6wOy3zFj+31sQ8CW5eHe8Kr4rDOQQRRmh4Ctgiiaf0zoaYVjJ8xmcSfkRmSdNBmErXgCJ4ZObUQG9agjai1RVGMx1UpBiiONG6P34247LcejVjwHT9imXPrqd5Fh4ZYVh4P+CURe9CNPQhcped/ZCXXBM70/k9g6YEujNXa18rAEab3rfene2zwTPU3MgMLXvIDiF6qZWofJ6vFu8+Pbl3mcfHBZfnPZuAXXyA0GNteGnqAyN3s89pZQWnKfGot9IRC2FU9tZE/8SSuwlNSaULVGo3+ebKMFL3Za4VJLbdpMbNMWqwspRzqj4vpv3chXFtzPHgzC4UxyBtyDLgHNkbr00cTBcLuxb+4HtJOeV3GGde407nZTfso8GE4V5/kb/I88/4WqmsF/3WDbvEBAe6myVTKDSwlS54aX5FcFRtDEwFzGvg6Bm1FLEsY6/cbUTkfqJWyzW2FjHja6MdJGchRa1R4uoxuVgU0Yvsv/sc+2XPH5eU43QMDY/0Yw9W8ukPQFIACt+aZJsTHgsyh0+djU7z0Hr/H7glcYJkkY/h0Op++i4zCd+hzm//ICiz0MD3DwLyy04sheA7V44o9tB2tOpYXCdnbxIohXpPAGdd39ENgXuBS5orqEnU1lPRN06u6cjNryqwmnUPmDbaxoj9z0UMRTNj4UceTBmF6BEb0dBjWHP4U2dva7xdZ/AA== -------------------------------------------------------------------------------- /notebooks/10-Symbolic-Math/10.00-Introduction.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Symbolic Math" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Introduction" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "latex": { 21 | "after_cell": "newpage" 22 | } 23 | }, 24 | "source": [ 25 | "By the end of this chapter you will be able to:\n", 26 | "\n", 27 | " * Define Python variables as symbolic math variables\n", 28 | " \n", 29 | " * Define mathematical expressions and equations using symbolic math variables\n", 30 | " \n", 31 | " * Solve for symbolic math variables in terms of other symbolic math variables\n", 32 | " \n", 33 | " * Derive numerical solutions using symbolic math variable substitution\n", 34 | " \n", 35 | " * Solve linear and quadratic equations using symbolic math\n", 36 | "\n", 37 | " * Solve systems of equations using symbolic math" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": null, 43 | "metadata": {}, 44 | "outputs": [], 45 | "source": [] 46 | } 47 | ], 48 | "metadata": { 49 | "kernelspec": { 50 | "display_name": "Python 3", 51 | "language": "python", 52 | "name": "python3" 53 | }, 54 | "language_info": { 55 | "codemirror_mode": { 56 | "name": "ipython", 57 | "version": 3 58 | }, 59 | "file_extension": ".py", 60 | "mimetype": "text/x-python", 61 | "name": "python", 62 | "nbconvert_exporter": "python", 63 | "pygments_lexer": "ipython3", 64 | "version": "3.6.8" 65 | } 66 | }, 67 | "nbformat": 4, 68 | "nbformat_minor": 2 69 | } 70 | -------------------------------------------------------------------------------- /notebooks/10-Symbolic-Math/images/statics_problem_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/10-Symbolic-Math/images/statics_problem_diagram.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/11.00-Introduction.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Python and External Hardware" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Introduction" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "latex": { 21 | "after_cell": "newpage" 22 | } 23 | }, 24 | "source": [ 25 | "By the end of this chapter you will be able to:\n", 26 | "\n", 27 | " * Connect external hardware to a computer running Python\n", 28 | " \n", 29 | " * Install the PySerial library\n", 30 | " \n", 31 | " * Read data over a serial connection using Python\n", 32 | " \n", 33 | " * Save data coming in over a serial connection using Python\n", 34 | " \n", 35 | " * Write data to a serial line using Python\n", 36 | " \n", 37 | " * Read data from a sensor using Python\n", 38 | " \n", 39 | " * Control an LED using Python" 40 | ] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "execution_count": null, 45 | "metadata": {}, 46 | "outputs": [], 47 | "source": [] 48 | } 49 | ], 50 | "metadata": { 51 | "kernelspec": { 52 | "display_name": "Python 3", 53 | "language": "python", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "codemirror_mode": { 58 | "name": "ipython", 59 | "version": 3 60 | }, 61 | "file_extension": ".py", 62 | "mimetype": "text/x-python", 63 | "name": "python", 64 | "nbconvert_exporter": "python", 65 | "pygments_lexer": "ipython3", 66 | "version": "3.6.8" 67 | } 68 | }, 69 | "nbformat": 4, 70 | "nbformat_minor": 2 71 | } 72 | -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/11.06-Project-Ideas.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Project Ideas" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "P11.01 Use Python and PySerial measure light levels using a photoresistor connected to an Arduino.\n", 15 | "\n", 16 | "P11.02 Use Python and PySerial to control a relay connected to an Arduino\n", 17 | "\n", 18 | "P11.03 Use Python and PySerial to read a pH sensor connected to an Arduino\n", 19 | "\n", 20 | "P11.04 Use Python and PySerial to read a photosensor connected to an Arduino and turn on and off an LED based on light level.\n", 21 | "\n", 22 | "\n", 23 | "P11.05 Use Python and PySerial to read a temperature connected to an Arduino and send temperature measurements up to an IoT cloud server, like io.adafruit.com using the Requests package.\n", 24 | "\n", 25 | "P11.06 Use Python and PySerial to turn on and off an LED connected to an Arduino based on values stored on an IoT cloud server, like io.adafruit.com, using the Requests package." 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": null, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [] 34 | } 35 | ], 36 | "metadata": { 37 | "celltoolbar": "Edit Metadata", 38 | "kernelspec": { 39 | "display_name": "Python 3", 40 | "language": "python", 41 | "name": "python3" 42 | }, 43 | "language_info": { 44 | "codemirror_mode": { 45 | "name": "ipython", 46 | "version": 3 47 | }, 48 | "file_extension": ".py", 49 | "mimetype": "text/x-python", 50 | "name": "python", 51 | "nbconvert_exporter": "python", 52 | "pygments_lexer": "ipython3", 53 | "version": "3.7.3" 54 | } 55 | }, 56 | "nbformat": 4, 57 | "nbformat_minor": 2 58 | } 59 | -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/Arduino_LED_fritzing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/Arduino_LED_fritzing.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/Arrow_to_Upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/Arrow_to_Upload.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/Check_to_Verify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/Check_to_Verify.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/Examples_Com_PhysicalPixel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/Examples_Com_PhysicalPixel.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/SerialMonitor_H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/SerialMonitor_H.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/Tools_SerialMonitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/Tools_SerialMonitor.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/Tools_SerialPlotter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/Tools_SerialPlotter.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/arduino_LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/arduino_LED.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/arduino_download_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/arduino_download_page.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/arduino_led.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/arduino_led.fzz -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/arduino_potentiometer.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/arduino_potentiometer.fzz -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/download_Arduino_IDE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/download_Arduino_IDE.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/file-examples-communication-physicalpixel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/file-examples-communication-physicalpixel.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/matplotlib_potentiometer_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/matplotlib_potentiometer_plot.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/redboard_LED.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/redboard_LED.fzz -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/redboard_LED_bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/redboard_LED_bb.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/redboard_LED_potentiometer.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/redboard_LED_potentiometer.fzz -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/redboard_pot_led_fritzing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/redboard_pot_led_fritzing.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/serial_monitor_L.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/serial_monitor_L.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/serial_monitor_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/serial_monitor_output.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/images/serial_plotter_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/11-Python-and-External-Hardware/images/serial_plotter_output.png -------------------------------------------------------------------------------- /notebooks/11-Python-and-External-Hardware/potentiometer_read.ino: -------------------------------------------------------------------------------- 1 | // potentiometer_read.ino 2 | // reads a potentiometer and sends value over serial 3 | int sensorPin = A0; // The potentiometer is connected to analog pin 0 4 | int ledPin = 13; // The LED is connected to digital pin 13 5 | int sensorValue; // an integer variable to store the potentiometer reading 6 | 7 | void setup() // this function runs once when the sketch starts 8 | { 9 | // make the LED pin (pin 13) an output pin 10 | pinMode(ledPin, OUTPUT); 11 | 12 | // initialize serial communication: 13 | Serial.begin(9600); 14 | } 15 | 16 | void loop() // this function runs repeatedly after setup() finishes 17 | { 18 | sensorValue = analogRead(sensorPin); // read the voltage at pin A0 19 | Serial.println(sensorValue); // Output sensor value to Serial Monitor 20 | 21 | if (sensorValue < 500) { // if sensor output is less than 500, 22 | digitalWrite(ledPin, LOW); } // Turn the LED off 23 | 24 | else { // if sensor output is greater than 500 25 | digitalWrite(ledPin, HIGH); } // Keep the LED on 26 | 27 | delay(100); // Pause 100 milliseconds before next reading 28 | } 29 | -------------------------------------------------------------------------------- /notebooks/12-MicroPython/12.00-Introduction.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# MicroPython" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Introduction" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "latex": { 21 | "after_cell": "newpage" 22 | } 23 | }, 24 | "source": [ 25 | "By the end of this chapter you will be able to:\n", 26 | "\n", 27 | " * Install MicroPython on a microcontroller\n", 28 | " \n", 29 | " * Run Python commands on a microcontroller using the MicroPython REPL\n", 30 | " \n", 31 | " * Save module files and run Python scripts on a microcontroller\n", 32 | " \n", 33 | " * Use MicroPython to read data off a sensor\n", 34 | " \n", 35 | " * Use MicroPython to switch on and off a light" 36 | ] 37 | }, 38 | { 39 | "cell_type": "code", 40 | "execution_count": null, 41 | "metadata": {}, 42 | "outputs": [], 43 | "source": [] 44 | } 45 | ], 46 | "metadata": { 47 | "kernelspec": { 48 | "display_name": "Python 3", 49 | "language": "python", 50 | "name": "python3" 51 | }, 52 | "language_info": { 53 | "codemirror_mode": { 54 | "name": "ipython", 55 | "version": 3 56 | }, 57 | "file_extension": ".py", 58 | "mimetype": "text/x-python", 59 | "name": "python", 60 | "nbconvert_exporter": "python", 61 | "pygments_lexer": "ipython3", 62 | "version": "3.6.4" 63 | } 64 | }, 65 | "nbformat": 4, 66 | "nbformat_minor": 2 67 | } 68 | -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/Anaconda_Prompt.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/Anaconda_Prompt.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/Anaconda_choose_python_version.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/Anaconda_choose_python_version.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/Anaconda_downloads_page.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/Anaconda_downloads_page.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/MicroPython_in_jupyter_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/MicroPython_in_jupyter_notebook.png -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/REPL_prompt.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/REPL_prompt.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/active_new_conda_env.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/active_new_conda_env.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/bin_file_to_new_directory.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/bin_file_to_new_directory.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/bin_in_dir.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/bin_in_dir.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/conda_activate.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/conda_activate.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/conda_create_new_virtualenv.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/conda_create_new_virtualenv.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/conda_install_mpy-repl-tool.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/conda_install_mpy-repl-tool.jpg -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/conda_list.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/conda_list.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/conda_there-jupyter-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/conda_there-jupyter-setup.png -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/device_manager_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/device_manager_menu.png -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/download_putty.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/download_putty.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/download_silabs_driver.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/download_silabs_driver.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/downloads_folder.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/downloads_folder.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/esptool_erase_flash.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/esptool_erase_flash.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/esptool_help.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/esptool_help.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/esptool_write_flash.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/esptool_write_flash.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/feather_huzzah_temp_sensor_fritzing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/feather_huzzah_temp_sensor_fritzing.png -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/find_device_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/find_device_manager.png -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/firmware_download_page.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/firmware_download_page.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/import_port_diag.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/import_port_diag.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/micropython_modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/micropython_modules.png -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/mkdir_micropython.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/mkdir_micropython.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/pip_install_esptool.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/pip_install_esptool.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/putty_config.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/putty_config.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/putty_in_start_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/putty_in_start_menu.png -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/sys_dot_implementation_and_platform.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/sys_dot_implementation_and_platform.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/sys_dot_platform.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/sys_dot_platform.PNG -------------------------------------------------------------------------------- /notebooks/12-MicroPython/images/there.jupyter-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/12-MicroPython/images/there.jupyter-setup.png -------------------------------------------------------------------------------- /notebooks/99-Appendix/99.00-Appendix.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Appendix" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Contents" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "latex": { 21 | "after_cell": "newpage" 22 | } 23 | }, 24 | "source": [ 25 | "The following is detailed in the appendix:\n", 26 | "\n", 27 | " * Reserved and Key Words in Python\n", 28 | " \n", 29 | " * ASCII Character Codes\n", 30 | " \n", 31 | " * Virtual Environments\n", 32 | " \n", 33 | " * NumPy Math Functions\n", 34 | " \n", 35 | " * Git and GitHub\n", 36 | " \n", 37 | " * LaTeX Math\n", 38 | " \n", 39 | " * Problem Solving with Python 3.7 Edition Book Construction\n", 40 | " \n", 41 | " * Contributions\n", 42 | " \n", 43 | " * Cover Artwork\n", 44 | " \n", 45 | " * About the author" 46 | ] 47 | }, 48 | { 49 | "cell_type": "code", 50 | "execution_count": null, 51 | "metadata": {}, 52 | "outputs": [], 53 | "source": [] 54 | } 55 | ], 56 | "metadata": { 57 | "celltoolbar": "Edit Metadata", 58 | "kernelspec": { 59 | "display_name": "Python 3", 60 | "language": "python", 61 | "name": "python3" 62 | }, 63 | "language_info": { 64 | "codemirror_mode": { 65 | "name": "ipython", 66 | "version": 3 67 | }, 68 | "file_extension": ".py", 69 | "mimetype": "text/x-python", 70 | "name": "python", 71 | "nbconvert_exporter": "python", 72 | "pygments_lexer": "ipython3", 73 | "version": "3.6.8" 74 | } 75 | }, 76 | "nbformat": 4, 77 | "nbformat_minor": 2 78 | } 79 | -------------------------------------------------------------------------------- /notebooks/99-Appendix/99.08-Contributions.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Contributions" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Any corrections, typos or suggestions to improve the text can be emailed to:\n", 15 | "\n", 16 | " > [errata@problemsolvingwithpython.com](mailto:errata@problemsolvingwithpython.com)\n", 17 | " \n", 18 | "Please include the chapter number and section number in your email. Include in your email if you would like to remain anonymous or have your name recognized in the contributor list. Thank-you in advance for improving the text for others." 19 | ] 20 | }, 21 | { 22 | "cell_type": "markdown", 23 | "metadata": {}, 24 | "source": [ 25 | "### Contributor List\n", 26 | "\n", 27 | " * Levi, Blessing, and Ngan helped improve some review questions\n", 28 | " \n", 29 | " * Justin improved a worked example and corrected typos in review questions and Chapter 5." 30 | ] 31 | }, 32 | { 33 | "cell_type": "code", 34 | "execution_count": null, 35 | "metadata": {}, 36 | "outputs": [], 37 | "source": [] 38 | } 39 | ], 40 | "metadata": { 41 | "kernelspec": { 42 | "display_name": "Python 3", 43 | "language": "python", 44 | "name": "python3" 45 | }, 46 | "language_info": { 47 | "codemirror_mode": { 48 | "name": "ipython", 49 | "version": 3 50 | }, 51 | "file_extension": ".py", 52 | "mimetype": "text/x-python", 53 | "name": "python", 54 | "nbconvert_exporter": "python", 55 | "pygments_lexer": "ipython3", 56 | "version": "3.6.8" 57 | } 58 | }, 59 | "nbformat": 4, 60 | "nbformat_minor": 2 61 | } 62 | -------------------------------------------------------------------------------- /notebooks/99-Appendix/99.09-Cover-Artwork.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Cover Artwork" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Mike Schultz is a printmaker and illustrator who has taught art to Burmese migrant youth on the Thailand-Burma border. He currently lives and works in Portland, Oregon with his cat, Siam.\n", 15 | "\n", 16 | "Instagram: [```@mike_schultz_studio```](https://www.instagram.com/mike_schultz_studio/)\n", 17 | "\n", 18 | "Website: [mikeschultzstudio.com](http://mikeschultzstudio.squarespace.com/)" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": null, 24 | "metadata": {}, 25 | "outputs": [], 26 | "source": [] 27 | } 28 | ], 29 | "metadata": { 30 | "kernelspec": { 31 | "display_name": "Python 3", 32 | "language": "python", 33 | "name": "python3" 34 | }, 35 | "language_info": { 36 | "codemirror_mode": { 37 | "name": "ipython", 38 | "version": 3 39 | }, 40 | "file_extension": ".py", 41 | "mimetype": "text/x-python", 42 | "name": "python", 43 | "nbconvert_exporter": "python", 44 | "pygments_lexer": "ipython3", 45 | "version": "3.6.8" 46 | } 47 | }, 48 | "nbformat": 4, 49 | "nbformat_minor": 2 50 | } 51 | -------------------------------------------------------------------------------- /notebooks/99-Appendix/99.10-About-the-Author.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## About the Author" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Peter D. Kazarinoff, PhD is a full-time faculty member in Engineering and Engineering Technology at Portland Community College in Portland, Oregon. Peter earned a PhD in Materials Science and Engineering from the University of Washington and a BA from Cornell University. He teaches courses in Engineering Programming, Materials Science, Manufacturing and others at Portland Community College.\n", 15 | "\n", 16 | "He blogs at: [pythonforundergradengineers.com](https://pythonforundergradengineers.com/)\n", 17 | "\n", 18 | "Peter lives in beautiful Portland, Oregon with his wife and two kids." 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": null, 24 | "metadata": {}, 25 | "outputs": [], 26 | "source": [] 27 | } 28 | ], 29 | "metadata": { 30 | "kernelspec": { 31 | "display_name": "Python 3", 32 | "language": "python", 33 | "name": "python3" 34 | }, 35 | "language_info": { 36 | "codemirror_mode": { 37 | "name": "ipython", 38 | "version": 3 39 | }, 40 | "file_extension": ".py", 41 | "mimetype": "text/x-python", 42 | "name": "python", 43 | "nbconvert_exporter": "python", 44 | "pygments_lexer": "ipython3", 45 | "version": "3.6.8" 46 | } 47 | }, 48 | "nbformat": 4, 49 | "nbformat_minor": 2 50 | } 51 | -------------------------------------------------------------------------------- /notebooks/figures/anaconda_download_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/notebooks/figures/anaconda_download_page.png -------------------------------------------------------------------------------- /pdf/copywrite_page.tex: -------------------------------------------------------------------------------- 1 | %% copywrite_page.tex 2 | %% Copywrite Problem Solving with Python 3.7 Edition 3 | 4 | \textbf{Problem Solving with Python 3.7 Edition} \\ 5 | by Peter D. Kazarinoff \\ 6 | \\ 7 | \texttt{ISBN: 9781693405419} \\ 8 | \\ 9 | Copywrite \ \textcopyright \ 2018 - 2019 Peter D. Kazarinoff\\ 10 | 11 | \vspace{3in} 12 | 13 | \textbf{Revision History}\\ 14 | \\ 15 | 2018-01-09 Initial Release\\ 16 | \\ 17 | 2019-02-01 3.6.2 Edition\\ 18 | Reformat Table of Contents\\ 19 | Revision to end of chapter questions\\ 20 | 21 | 2019-03-15 3.7.0 Edition \\ 22 | Re-ordered chapters: Jupyter Notebooks chapter after Orientation chapter \\ 23 | Re-ordered chapters: Arrays and Matricies chapter after Data Types and Variables chapter \\ 24 | Re-ordered chapters: Functions chapter after Plotting with Matplotlib chapter \\ 25 | 26 | 2019-09-15 3.7.4 Edition \\ 27 | Revision of Orientation chapter: Images and text for Python 3.7 installation \\ 28 | Revision of Plotting with Matplotlib chapter: New table of object-oriented plotting commands \\ 29 | New end of chapter questions: Arrays and Matricies chapter, Loops chapter \\ 30 | -------------------------------------------------------------------------------- /pdf/dedication_page.tex: -------------------------------------------------------------------------------- 1 | %% dedication_page.tex 2 | %% Problem Solving with Python 3.6 Edition 3 | 4 | \vspace*{\fill} 5 | \begin{center} 6 | \textbf{This book is dedicated to my wonderful and loving wife, Sophie and our two inquisitive daughters. I love you very much. Thank-you for helping make this text a reality.} 7 | \end{center} 8 | \vspace*{\fill}\clearpage %might not need the \clearpage command 9 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | matplotlib 2 | numpy 3 | pandas 4 | xlrd 5 | sympy 6 | pyserial 7 | jupyter -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.7 2 | -------------------------------------------------------------------------------- /templates/custom_colors.tplx: -------------------------------------------------------------------------------- 1 | %custom_colors.tplx 2 | 3 | \definecolor{stringred}{RGB}{186,33,33} 4 | \definecolor{commentteal}{RGB}{64,128,128} 5 | \definecolor{darkgreen}{RGB}{0,128,0} 6 | \definecolor{cm-keyword}{HTML}{008000} %jupyter notebook keyword color 7 | \definecolor{cm-builtin}{HTML}{008000} %jupyter notebook built-in function color 8 | \definecolor{cm-number}{HTML}{008800} %jupyter notebook number color 9 | \definecolor{cm-string}{HTML}{BA2121} %jupyter notebook string color 10 | \definecolor{cm-operator}{HTML}{AA22FF} %jupyter notebook operator color 11 | \definecolor{cm-comment}{HTML}{408080} %jupyter notebook comment color 12 | 13 | % end custom_colors.tplx 14 | -------------------------------------------------------------------------------- /templates/environments.tplx: -------------------------------------------------------------------------------- 1 | %environments.tplx 2 | 3 | \newenvironment{problems}{}{} %keep regular one column formatting in problems environment. Long table would not output in two col mode 4 | % \newenvironment{problems}{\begin{multicols}{2}}{\end{multicols}} %an environment for the review question sections, where two columns are shown instead of one column everywhere else. Depends on the logic looking for latex environment problems in notebook cell metadata. 5 | 6 | % in cell metadata 7 | %{ 8 | % "latex": { 9 | % "environment": "problems" 10 | % } 11 | %} 12 | 13 | \newenvironment{key_terms}{\begin{multicols}{3}}{\end{multicols}} %an environment for the key_terms and concepts sections, where three columns are shown instead of one column everywhere else. Depends on the logic looking for latex environment key terms in notebook cell metadata. 14 | 15 | % in cell metadata 16 | %{ 17 | % "latex": { 18 | % "environment": "key_terms" 19 | % } 20 | %} 21 | 22 | % to put a \new page before the cell in question. Add the json below to the cell metadata. 23 | 24 | % in cell metadata 25 | %{ 26 | % "latex": { 27 | % "before_cell": "newpage" 28 | % } 29 | %} 30 | 31 | 32 | % to put a \newpage after the cell in question. Add the json below to the cell metadata. 33 | % in cell metadata 34 | %{ 35 | % "latex": { 36 | % "after_cell": "newpage" 37 | % } 38 | %} 39 | 40 | % end environments.tplx 41 | -------------------------------------------------------------------------------- /templates/noprompts.tplx: -------------------------------------------------------------------------------- 1 | % extend the default article template: 2 | ((* extends 'article.tplx' *)) 3 | 4 | % display input without prompts: 5 | ((* block input scoped *)) 6 | \begin{Verbatim}[commandchars=\\\{\}] 7 | ((( cell.source | highlight_code(strip_verbatim=True) ))) 8 | \end{Verbatim} 9 | ((* endblock input *)) 10 | 11 | % treat execute_result (output with prompt) as display_data (output without prompt) 12 | ((* block execute_result scoped *)) 13 | ((* block display_data scoped *)) 14 | ((( super() ))) 15 | ((* endblock display_data *)) 16 | ((* endblock execute_result *)) -------------------------------------------------------------------------------- /website/docs/00-Preface/00.00-Motivation.md: -------------------------------------------------------------------------------- 1 | 2 | # Preface 3 | ## Motivation 4 | The motivation for writing this book is that many undergraduate engineering students have to take a programming course based on MATLAB. MATLAB is a great piece of software, but it currently costs $49.00 for a student license and requires a site license to be used on school computers. Subsequently, it is costly for a student to use MATLAB and it is costly for a college to support a course that uses MATLAB. In addition, this site license eventually expires and students need to purchase another copy often before they finish their degree. 5 | 6 | The Python programming language, on the other hand, is open source and free. To download and use Python, the cost to both the student and the college is zero (minus time spent). By moving an undergraduate engineering programming class to Python, students save money and gain greater access to the software they use in class. Later on in their engineering education, students can continue to use Python for free. 7 | 8 | 9 | -------------------------------------------------------------------------------- /website/docs/00-Preface/00.02-Acknowledgments.md: -------------------------------------------------------------------------------- 1 | 2 | ## Acknowledgments 3 | The creation of this book and supporting material would not be possible without the gracious support of my wife and family. Students at Portland Community College continue to give me hope that the next generation of engineers will be a diverse group of team problem solvers. 4 | 5 | _The Python Data Science Handbook_ and _Machine Learning in Python_ as well as _Reiman Equations in Python_ served as inspiration and examples of using Jupyter notebooks to construct a book. The _bookbook_ repository on GitHub provided a starting point for the tooling used to convert this book from Jupyter notebooks into a website and into LaTeX for printing. 6 | 7 | 8 | -------------------------------------------------------------------------------- /website/docs/00-Preface/00.03-Supporting-Materials.md: -------------------------------------------------------------------------------- 1 | 2 | ## Supporting Materials 3 | Supporting materials for this text can be found on the textbook website: 4 | 5 | > [problemsolvingwithpython.com](https://problemsolvingwithpython.com) 6 | 7 | The textbook website contains all of the text in web format. Code examples and Jupyter notebooks for the text can be found in the GitHub repository for the book: 8 | 9 | > [github.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition](https://github.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition) 10 | 11 | Live notebooks, where code examples found in the text can be run without installing any software, are available at: 12 | 13 | > [mybinder.org/v2/gh/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/master](https://mybinder.org/v2/gh/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/master) 14 | 15 | If you are an instructor and using this book in a course with students- please send me an email using your school email address. In the email, include the course you are teaching and the term, approximate enrollment, and a link to the course listing on your school website. 16 | 17 | > peter.kazarinoff@problemsolvingwithpython.com 18 | 19 | I am happy to reply with a solution key for the end of chapter review problems as well as quiz and exam question banks. 20 | 21 | 22 | -------------------------------------------------------------------------------- /website/docs/00-Preface/00.05-Errata.md: -------------------------------------------------------------------------------- 1 | 2 | ## Errata 3 | Errata including any typos, code errors and formatting inconsistencies can be submitted to: 4 | 5 | > errata@problemsolvingwithpython.com 6 | 7 | Please include the chapter number and section number in your email. Thank-you in advance for helping improve this text for future readers. 8 | 9 | 10 | -------------------------------------------------------------------------------- /website/docs/01-Orientation/01.00-Welcome.md: -------------------------------------------------------------------------------- 1 | 2 | # Orientation 3 | ## Introduction 4 | Welcome to the world of problem solving with Python! This first Orientation chapter will help you get started by guiding you through the process of installing Python on your computer. 5 | By the end of this chapter, you will be able to: 6 | 7 | * Describe why Python is a useful computer language for problem solvers 8 | 9 | * Describe applications where Python is used 10 | 11 | * Detail advantages of Python over other programming languages 12 | 13 | * Know the cost of Python 14 | 15 | * Know the difference between Python and Anaconda 16 | 17 | * Install Python on your computer 18 | 19 | * Install Anaconda on your computer 20 | 21 | 22 | -------------------------------------------------------------------------------- /website/docs/01-Orientation/01.07-Summary.md: -------------------------------------------------------------------------------- 1 | 2 | ## Summary 3 | In this chapter, you learned about the Anaconda distribution of Python and how the Anaconda distribution of Python compares the version of Python at Python.org. The Anaconda distribution of Python comes with about 600 packages pre-installed as well as Jupyter notebooks and the Anaconda Prompt. Jupyter notebooks and some of the pre-installed packages that come with Anaconda will be used later chapters. This text recommends that problem solvers install the Anaconda distribution of Python. 4 | 5 | This chapter showed how to install the Anaconda distribution of Python on Windows, MacOS, and Linux. 6 | 7 | At the end of the chapter, a description of how to download and install Python from Python.org was shown. 8 | ### Key Terms and Concepts 9 | Anaconda 10 | 11 | Anaconda Prompt 12 | 13 | download 14 | 15 | install 16 | 17 | Python 18 | 19 | Legacy Python 20 | 21 | Python Interpreter 22 | 23 | Python REPL 24 | 25 | package 26 | 27 | operating system 28 | 29 | Windows 30 | 31 | MacOS 32 | 33 | Linux 34 | 35 | terminal 36 | 37 | PATH 38 | 39 | 40 | -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/Anaconda_download_linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/Anaconda_download_linux.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_agree_to_license.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_agree_to_license.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_download_mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_download_mac.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_download_mac_ask_for_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_download_mac_ask_for_email.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_download_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_download_page.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_downloading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_downloading.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_enter_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_enter_email.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_from_start_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_from_start_menu.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_install_linux_copy_link_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_install_linux_copy_link_address.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_installer_advanced_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_installer_advanced_options.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_installer_click_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_installer_click_next.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_path2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_path2.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_prompt.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_python3_or_python2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_python3_or_python2.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_run_installer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_run_installer.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_select_windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_select_windows.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/anaconda_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/anaconda_window.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/conda_import_this.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/conda_import_this.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/conda_import_this_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/conda_import_this_output.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/conda_in_windows_start_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/conda_in_windows_start_menu.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/conda_prompt_type_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/conda_prompt_type_python.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/conda_type_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/conda_type_python.png -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/python_dot_org_macos_download.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/python_dot_org_macos_download.PNG -------------------------------------------------------------------------------- /website/docs/01-Orientation/images/python_dot_org_windows_download.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/01-Orientation/images/python_dot_org_windows_download.PNG -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/02.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # Jupyter Notebooks 3 | ## Introduction 4 | In this chapter, you will be introduced to Jupyter notebooks. A Jupyter notebook is an application that can run Python code, display plots, show equations and contain formatted text. Jupyter notebooks are a great tool for problem solvers to write, run, document and share Python code with others. 5 | 6 | By the end of this chapter you will be able to: 7 | 8 | * Explain what a Jupyter notebook is 9 | 10 | * Open a Jupyter notebook 11 | 12 | * Write Python code in a Jupyter notebook 13 | 14 | * Run Python code in a Jupyter notebook 15 | 16 | * Write and render markdown text in a Jupyter notebook 17 | 18 | * Save and close a Jupyter notebook 19 | 20 | * Download Jupyter notebooks in different file formats 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/Anaconda_Prompt_Jupyter_Notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/Anaconda_Prompt_Jupyter_Notebook.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/Jupyter_Home_Browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/Jupyter_Home_Browser.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/anaconda_navigator_jupyter_notebook_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/anaconda_navigator_jupyter_notebook_launch.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/anaconda_navigator_jupyter_notebook_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/anaconda_navigator_jupyter_notebook_start.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/anaconda_start_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/anaconda_start_menu.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/change_cell_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/change_cell_type.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/click_change_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/click_change_name.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/code_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/code_cell.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/downloading_complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/downloading_complete.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/engineering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/engineering.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/file_download_as_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/file_download_as_notebook.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/file_make_a_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/file_make_a_copy.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/insert_cell_above.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/insert_cell_above.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_anaconda_prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_anaconda_prompt.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_dot_py_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_dot_py_file.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_example.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_export_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_export_options.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_markdown_cells_as_comments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/jupyter_notebook_markdown_cells_as_comments.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/kernel_restart_and_clear_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/kernel_restart_and_clear_output.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/markdown_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/markdown_cell.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/new_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/new_notebook.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/new_notebook_from_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/new_notebook_from_browser.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/notebook_file_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/notebook_file_browser.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/notebook_file_browser_click_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/notebook_file_browser_click_folder.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/notebook_file_browser_click_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/notebook_file_browser_click_notebook.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/notebook_json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/notebook_json.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/output_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/output_cell.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/rename_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/rename_dialog.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/rename_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/rename_notebook.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/rename_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/rename_window.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/run_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/run_cell.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/run_import_this.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/run_import_this.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/save_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/save_notebook.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/windows_start_anaconda_navigator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/windows_start_anaconda_navigator.png -------------------------------------------------------------------------------- /website/docs/02-Jupyter-Notebooks/images/windows_start_jupyter_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/02-Jupyter-Notebooks/images/windows_start_jupyter_notebook.png -------------------------------------------------------------------------------- /website/docs/03-The-Python-REPL/03.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # The Python REPL 3 | ## Introduction 4 | In this chapter, you will learn how to write and run your first lines of Python code at the Python REPL also called the Python prompt. You will learn how to use Python as a calculator and be introduced to Python variables and Python's ```print()``` function. 5 | By the end of this chapter, you will be able to: 6 | 7 | * Open and close the Python REPL 8 | 9 | * Compute mathematical calculations using the Python REPL 10 | 11 | * Use the output from the Python REPL as input in another problem 12 | 13 | * Import the math and statistics modules from the Python Standard Library and use their functions 14 | 15 | * Assign values to variables 16 | 17 | * Use variables in calculations 18 | 19 | * Create strings 20 | 21 | * Combine and compare strings 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /website/docs/03-The-Python-REPL/03.02-Variables.md: -------------------------------------------------------------------------------- 1 | 2 | ## Variables 3 | Variables are assigned in Python using the ```=``` equals sign also called the _assignment operator_. The statement: 4 | 5 | ```python 6 | a = 2 7 | ``` 8 | 9 | Assigns the integer ```2``` to the variable ```a```. 10 | 11 | ```python 12 | >>> a = 2 13 | >>> a 14 | 2 15 | ``` 16 | Note the assignment operator ```=```(equals), is different from the logical comparison operator ```==``` (equivalent to). 17 | ```python 18 | >>> a == 2 19 | True 20 | ``` 21 | Variable names in Python must conform to the following rules: 22 | 23 | * variable names must start with a letter 24 | * variable names can only contain letters, numbers, and the underscore character ```_``` 25 | * variable names can not contain spaces 26 | * variable names can not include punctuation 27 | * variable names are not enclosed in quotes or brackets 28 | The following code lines show valid variable names: 29 | ```text 30 | constant = 4 31 | 32 | new_variable = 'var' 33 | 34 | my2rules = ['rule1','rule2'] 35 | 36 | SQUARES = 4 37 | ``` 38 | The following code lines show invalid variable names: 39 | ```text 40 | a constant = 4 41 | 42 | 3newVariables = [1, 2, 3] 43 | 44 | &sum = 4 + 4 45 | ``` 46 | Let's solve the problem below at the Python REPL using variables. 47 | 48 | #### Problem 49 | 50 | The Arrhenius relationship states: 51 | 52 | $$ n = n_{v}e^{-Q_v/(RT)} $$ 53 | 54 | In a system where $n_v = 2.0 \times 10^{-3}$, $Q_v = 5$, $R=3.18$, and $T=293$, calculate $n$. 55 | 56 | #### Solution 57 | 58 | Use variables to assign a value to each one of the constants in the problem and calculate $n$. 59 | 60 | ```python 61 | >>> nv = 2.0e-3 62 | >>> Qv = 5 63 | >>> R = 3.18 64 | >>> T = 293 65 | >>> from math import exp 66 | >>> n = nv*exp(-1*Qv/(R*T)) 67 | >>> n 68 | 0.0019892961379660424 69 | ``` 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /website/docs/03-The-Python-REPL/03.04-Print-Statements.md: -------------------------------------------------------------------------------- 1 | 2 | ## Print Statements 3 | One built-in function in Python is ```print()```. The value or expression inside of the parenthesis of a ```print()``` function "prints" out to the REPL when the ```print()``` function is called. 4 | 5 | An example using the ```print()``` function is below: 6 | 7 | ```python 8 | >>> name = "Gabby" 9 | >>> print("Your name is: ") 10 | Your name is: 11 | >>> print(name) 12 | Gabby 13 | ``` 14 | 15 | Remember that strings must be enclosed by quotation marks. The following command produces an error. 16 | 17 | ```python 18 | >>> print(Gabby) 19 | 20 | NameError: name 'Gabby' is not defined 21 | ``` 22 | 23 | This error is corrected by surrounding the string ```Gabby``` with quotation marks. 24 | 25 | ```python 26 | >>> print("Gabby") 27 | Gabby 28 | ``` 29 | 30 | Expressions passed to the ```print()``` function are evaluated before they are printed out. For instance, the sum of two numbers can be shown with the ```print()``` function. 31 | 32 | ```python 33 | >>> print(1+2) 34 | 3 35 | ``` 36 | 37 | If you want to see the text ```1+2```, you need to define ```"1+2"``` as a string and print out the string ```"1+2"``` instead. 38 | 39 | ```python 40 | >>> print("1+2") 41 | 1+2 42 | ``` 43 | Strings can be concatenated (combined) inside of a ```print()``` statement. 44 | 45 | ```python 46 | >>> name = Gabby 47 | >>> print('Your name is: ' + name) 48 | Your name is Gabby 49 | ``` 50 | The ```print()``` function also prints out individual expressions one after another with a space in between when the expressions are placed inside the ```print()``` function and separated by a comma. 51 | 52 | ```python 53 | >>> print("Name:","Gabby","Age", 2+7) 54 | Name: Gabby Age 9 55 | ``` 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /website/docs/04-Data-Types-and-Variables/04.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # Data Types and Variables 3 | ## Introduction 4 | This chapter is about Python data types. Python has many built-in data types such as integers, floats, booleans, strings, and lists. 5 | 6 | By the end of this chapter you will be able to: 7 | 8 | * Explain the difference between Python's built-in data types 9 | 10 | * Define variables with the assignment operator ```=``` 11 | 12 | * Create variables with different data types 13 | 14 | * Use Python's ```type()``` function to determine an object's data type 15 | 16 | * Compare variables with the comparison operator ```==``` 17 | 18 | * Convert variables from one data type to another 19 | 20 | * Work with integers, floats and complex numbers 21 | 22 | * Understand the boolean data type 23 | 24 | * Create and modify lists, dictionaries and tuples 25 | 26 | * Index and slice strings, lists and tuples 27 | 28 | 29 | -------------------------------------------------------------------------------- /website/docs/04-Data-Types-and-Variables/images/reverse_string_indexing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/04-Data-Types-and-Variables/images/reverse_string_indexing.png -------------------------------------------------------------------------------- /website/docs/04-Data-Types-and-Variables/images/reverse_string_indexing.xml: -------------------------------------------------------------------------------- 1 | 1ZhdT4MwGIV/DZdLaDvYduuc0wtNDCZeN/AOmhRKuk6Yv95OWgd2Jho1lBvSnpZ+PD0hnAZkXbZbSeviXmTAAxxmbUCuA4yXi5V+noRjJ8Rx1Am5ZFknobOQsFcwYmjUA8tgP+iohOCK1UMxFVUFqRpoVErRDLvtBB/OWtMcHCFJKXfVZ5apwmwrCs/6LbC8sDOj0LSU1HY2wr6gmWh6EtkEZC2FUF2pbNfAT+wsl+69my9aPxYmoVLfeeF6RY85ytuyfIQbxp+2s4dkZkZ5ofxgNvwAOVXsBbR6V2XQmsWroyXSFExBUtP0VG/0oQfkqlAl1zWki3Rfd+ewYy3oqa/cddpJQSpoe5JZ9xZECUoedRfrIoPQeAhZ+k3vRIxU9A7DatR4IP8Y+IxJFwypH1DDDrV1QSVNFUgPcWEyMi7i4Jotf81pJyplPhc4/htuKPbMZ3MHXDIFbqMbLnINt/ARHJ57ZrjYASemwG10wy1cw8U+giPYM8MtHXB8CtxGN9zKNVzkI7h56JnhbK7okTtMAdzojkNuVLD/J56R8y0tIDcuqCmAG99yF4ID8ZFc5FtwQG5yYFMAN77lLkQH7CO52LfogCaSHT6DG99yF8ID8pHcwrfwgNz0UE0B3D9aTlfPN8rvbb1rebJ5Aw== -------------------------------------------------------------------------------- /website/docs/04-Data-Types-and-Variables/images/string_indexing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/04-Data-Types-and-Variables/images/string_indexing.png -------------------------------------------------------------------------------- /website/docs/04-Data-Types-and-Variables/images/string_indexing.xml: -------------------------------------------------------------------------------- 1 | 1Zhda4MwGIV/jZcFk1Tb3rbdul1sMBzsOmiqgWgkTafdr186Y6u8FDa2YXIjyUnMx/MehGNANmW7U7QunmTGRIDDrA3INsB4uViZ51k4dUIcR52QK551EroKCf9gVgyteuQZO4wmaimF5vVYTGVVsVSPNKqUbMbT9lKMd61pzoCQpFRA9Y1nurDXisKr/sB4XvQ7o9COlLSfbIVDQTPZDCRyF5CNklJ3rbLdMHFm13Pp3ru/MXo5mGKV/s4L2xU95Shvy/KF3XPxups9JzO7yjsVR3vhTUEVTTVT9tT61KNoCq5ZUtP03G9MtQOyLnQpTA+ZJj3UXQH2vGVmz7VdminN2ptnRhcSxkFMlkyrk5nS28eys+ZBPfZmUAorFYMq9Bq1xc8vC1/5mIZF9ANcGOB6rDJzO/dQYTIxKgJQJb/GtJeVtp8IHP8NNhQ7ZrE54Bb6wG1yv0WAm3SRG5475rcYcEM+cJvcbwvATbjIjWDH/LYE3LAP3Cb32wpwO7rIbR465rc+SAzAER/ATW44BLOBdhKcayEBwZQw9wHc9I6DmYG7CC5yLTMgGBoiH8BN7zhPUkPsWmpAMDbEPoCb3nEwN1Quglu4lhsQDA4LH8D9o+NM9/r7+Gts8A+e3H0C -------------------------------------------------------------------------------- /website/docs/05-NumPy-and-Arrays/05.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # NumPy and Arrays 3 | ## Introduction 4 | By the end of this chapter you will be able to: 5 | 6 | * Explain the difference between a Python list and a NumPy array 7 | 8 | * Create NumPy arrays 9 | 10 | * Modify NumPy arrays 11 | 12 | * Index NumPy arrays 13 | 14 | * Run mathematical operations on NumPy arrays 15 | 16 | * Solve a system of linear equations using matrices 17 | 18 | 19 | -------------------------------------------------------------------------------- /website/docs/05-NumPy-and-Arrays/05.01-NumPy.md: -------------------------------------------------------------------------------- 1 | 2 | ## NumPy 3 | NumPy is a Python package used for numerical computation. NumPy is one of the foundational packages for scientific computing with Python. NumPy's core data type is the array and NumPy functions operate on arrays. 4 | 5 | 6 | -------------------------------------------------------------------------------- /website/docs/05-NumPy-and-Arrays/05.09-Summary.md: -------------------------------------------------------------------------------- 1 | 2 | ## Summary 3 | In this chapter, you learned how to work with NumPy arrays. NumPy is a Python package used for numerical calculations and arrays. An array is a data structure which only contains objects that share the same data type. Arrays are faster than lists in large-scale numerical calculations. 4 | 5 | You learned how to create arrays in a variety of ways: 6 | 7 | * Create an array from a Python list with ```np.array()``` 8 | * Create an array of regularly spaced numbers with ```np.arange()```, ```np.linspace()```, and ```np.logspace``` 9 | * Create an array of random numbers with ```np.random.ranint()```, ```np.random.rand()```, and ```np.random.randn()``` 10 | * Create two 2D arrays from two 1D arrays with ```np.meshgrid()``` and ```np.mgrid()``` 11 | 12 | You learned how to index and slice arrays. Slicing NumPy arrays share the same syntax used to slice Python lists and strings. 13 | 14 | At the end of the chapter, you learned how to run mathematical operations on arrays. NumPy's mathematical functions operate on arrays like Python's math functions operate on integers and floats. NumPy has additional functions like ```np.dot()``` and ```np.cross()``` that cannot be applied to scalars. NumPy's ```np.linalg.solve()``` function can be used to solve systems of linear equations. 15 | ### Key Terms and Concepts 16 | NumPy 17 | 18 | array 19 | 20 | scalar 21 | 22 | computationally expensive 23 | 24 | slice 25 | 26 | index 27 | 28 | data type 29 | 30 | homogenous 31 | 32 | homogenous data type 33 | 34 | element-wise 35 | 36 | system of linear equations 37 | 38 | attribute 39 | 40 | scientific computing 41 | 42 | Unicode 43 | 44 | iterable 45 | 46 | logarithmically spaced numbers 47 | 48 | normal distribution 49 | 50 | meshgrid 51 | 52 | matrix multiplication methods 53 | 54 | dot product 55 | 56 | cross product 57 | 58 | 59 | -------------------------------------------------------------------------------- /website/docs/06-Plotting-with-Matplotlib/06.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # Plotting with Matplotlib 3 | ## Introduction 4 | By the end of this chapter you will be able to: 5 | 6 | * Import Matplotlib into a Python script or Jupyter notebook 7 | 8 | * Construct line plots with Matplotlib 9 | 10 | * Use Matplotlib's object-oriented interface 11 | 12 | * Construct bar charts and pie charts with Matplotlib 13 | 14 | * Add error bars to bar charts and line plots 15 | 16 | * Plot histograms 17 | 18 | * Make box plots and violin plots 19 | 20 | * Plot contours 21 | 22 | * Create quiver plots and stream plots 23 | 24 | * Construct 3D mesh grid plots 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /website/docs/06-Plotting-with-Matplotlib/06.01-What-is-Matplotlib.md: -------------------------------------------------------------------------------- 1 | 2 | ## What is Matplotlib? 3 | Matplotlib is a popular Python package used to build plots. Matplotlib started as a project in the early 2000's partly to use Python to visualize the electronic signals in the brain of epilepsy patients. Matplotlib's creator, John D. Hunter, was a neurobiologist. He was looking for a way to replicate MATLAB's plotting capability with Python. In addition to starting Matplotlib, Dr. Hunter was part of the founding group that created Numfocus. The Numfocus group oversees some major Python projects including Matplotlib, NumPy, Pandas, and Jupyter. 4 | ### Why use Matplotlib? 5 | Matplotlib is useful for creating static 2D plots, the kind of plots included in scientific publications and presentations. Almost any plot created in Microsoft Excel can be created with Matplotlib. Matplotlib can also be used to make 3D plots and animations. 6 | 7 | 8 | -------------------------------------------------------------------------------- /website/docs/06-Plotting-with-Matplotlib/06.02-Installing Matplotlib.md: -------------------------------------------------------------------------------- 1 | 2 | ## Installing Matplotlib 3 | Before Matplotlib's plotting functions can be used, Matplotlib needs to be installed. Depending on which distribution of Python is installed on your computer, the installation methods are slightly different. 4 | ### Use the Anaconda distribution of Python 5 | 6 | The simplest way to install Matplotlib is to download and install the Anaconda distribution of Python. The Anaconda distribution of Python comes with Matplotlib pre-installed and no further installation steps are necessary. 7 | 8 | Below are additional methods to install Matplotlib if you are not using the Anaconda distribution of Python. 9 | ### Install Matplotlib with the Anaconda Prompt 10 | 11 | Matplotlib can be installed using with the **Anaconda Prompt**. If the **Anaconda Prompt** is available on your machine, it can usually be seen in the Windows Start Menu. To install Matplotlib, open the **Anaconda Prompt** and type: 12 | 13 | ```text 14 | > conda install matplotlib 15 | ``` 16 | 17 | Type ```y``` for yes when prompted. 18 | ### Install Matplotlib with **pip** 19 | 20 | Matplotlib can also be installed using the Python package manager, **pip**. To install Matplotlib with **pip**, open a terminal window and type: 21 | 22 | ```text 23 | $ pip install matplotlib 24 | ``` 25 | 26 | This command installs Matplotlib in the current working Python environment. 27 | ### Verify the installation 28 | To verify that Matplotlib is installed, try to invoke Matplotlib's version at the Python REPL. Use the commands below that include calling the ```.__version__``` an attribute common to most Python packages. 29 | ```python 30 | >>> import matplotlib 31 | >>> matplotlib.__version__ 32 | '3.1.1' 33 | ``` 34 | 35 | 36 | -------------------------------------------------------------------------------- /website/docs/06-Plotting-with-Matplotlib/images/3_quiver_plots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/06-Plotting-with-Matplotlib/images/3_quiver_plots.png -------------------------------------------------------------------------------- /website/docs/06-Plotting-with-Matplotlib/images/bar_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/06-Plotting-with-Matplotlib/images/bar_plot.png -------------------------------------------------------------------------------- /website/docs/06-Plotting-with-Matplotlib/images/bar_plot_with_error_bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/06-Plotting-with-Matplotlib/images/bar_plot_with_error_bars.png -------------------------------------------------------------------------------- /website/docs/06-Plotting-with-Matplotlib/images/plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/06-Plotting-with-Matplotlib/images/plot.png -------------------------------------------------------------------------------- /website/docs/07-Functions-and-Modules/07.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # Functions and Modules 3 | ## Introduction 4 | In computer programming, functions are a way to bundle multiple lines of code together to run as one block of code. Many functions accept input, called arguments, and produce output. Python has many built-in functions such as ```type()```, ```len()``` and ```pow()```. In this chapter you will learn how to create user-defined functions in Python. 5 | 6 | By the end of this chapter you will be able to: 7 | 8 | * Call functions in Python 9 | 10 | * Import functions into Python scripts 11 | 12 | * Create user-defined functions 13 | 14 | * Create functions with default arguments 15 | 16 | * Utilize functions with positional and keyword arguments 17 | 18 | * Write reusable code for other problem solvers to use 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /website/docs/07-Functions-and-Modules/07.08-Summary.md: -------------------------------------------------------------------------------- 1 | 2 | ## Summary 3 | This chapter introduced user-defined functions. Functions are useful because functions are reusable pieces of code. All functions have names. Some functions take input arguments and produce output. Functions in Python are defined with the keyword ```def```. You learned how to create functions with default arguments. You also learned the difference between positional arguments and keyword arguments. Positional arguments must be included in the proper order. Keyword arguments must include the keyword name and an equals sign. You learned how to call functions which are contained in a different file than the file that calls the function. One section of the chapter reviewed how docstrings work in Python functions and the results of calling Python's ```help()``` on a function that contains a docstring. At the end of the chapter you learned how to pass lists and dictionaries to Python functions. 4 | ### Key Terms and Concepts 5 | function 6 | 7 | function definition 8 | 9 | arguments 10 | 11 | default arguments 12 | 13 | positional arguments 14 | 15 | keyword arguments 16 | 17 | keyword 18 | 19 | output 20 | 21 | docstring 22 | 23 | return 24 | 25 | .py-file 26 | 27 | import 28 | 29 | syntax 30 | 31 | comments 32 | 33 | documentation 34 | 35 | iterable 36 | ### Python Commands 37 | 38 | | Command | Description | 39 | | --- | --- | 40 | | ```def``` | define a function | 41 | | ```return``` | define the expression or value a function outputs | 42 | | ```import``` | import a module or .py file | 43 | | ```from``` | import a function or class from a module or .py file | 44 | | ```as``` | name an alias for a function, method or class | 45 | | ``` """ """ ``` | define a docstring | 46 | 47 | 48 | -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/08.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # If Else Try Except 3 | ## Introduction 4 | In computer programming, selection structures run sections of code based on logical conditions. In this chapter you will learn about the selections structures if, else, and else if. The end of the chapter introduces another selection structure, the try / except block. 5 | 6 | By the end of this chapter you will be able to: 7 | 8 | * Utilize Python's ```input()``` function 9 | 10 | * Use if, else if, and else selection structures 11 | 12 | * Explain the difference between syntax errors and exception errors 13 | 14 | * Use try-except statements 15 | 16 | * Construct flowcharts to describe the flow of a Python program 17 | 18 | 19 | -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/08.02-Selection-Statements.md: -------------------------------------------------------------------------------- 1 | 2 | ## Selection Statements 3 | Selection statements are used in programming to select particular blocks of code to run based on a logical condition. The primary selection statements in Python are: 4 | 5 | * ```if``` 6 | * ```else``` 7 | * ```elif``` 8 | * ```try``` 9 | * ```except``` 10 | 11 | So far in this text, all of the Python code has either been strictly linear or linear and include functions. A strictly linear program is a program that runs top to bottom. Every line of code in a linear program is executed. In a linear program with functions, the program still runs head to base, but the program takes side excursions to execute functions on the way down. 12 | 13 | If this next couple chapters, you learn to write programs non-linearly. Non-linear programs do not run every line of code top to bottom. In non-linear programs, sections of code may not run based on selection statements like _if_ and _try_. Non-linear programs can include loops. Inside loops are sections of code that run multiple times. Loops are defined by repetition structures like _for loops_ and _while loops_. 14 | 15 | To start our discussion of non-linear programs, we will begin with _if statements_. 16 | 17 | 18 | -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/08.07-Summary.md: -------------------------------------------------------------------------------- 1 | 2 | ## Summary 3 | Selection structures in Python include ```if```, ```elif```, ```else```, ```try``` and ```except```. These selection structures allow certain blocks of code to run or not run based on logical conditions. Logical conditions are expressions or variables that can be evaluated as ```True``` or ```False```. You learned to indent code segments after ```if```, ```elif```, and ```else``` statements. Standard indentation in Python is four spaces. 4 | 5 | The difference between syntax errors and exception errors was demonstrated in this chapter. ```try```/```except``` blocks only check for exception errors. 6 | 7 | At the end of the chapter, you learned how to use flowcharts to describe the flow of a program with four basic shapes and arrows. 8 | ### Key Terms and Concepts 9 | selection structures 10 | 11 | if 12 | 13 | logical condition 14 | 15 | True 16 | 17 | False 18 | 19 | programmatic flow 20 | 21 | indentation 22 | 23 | pass 24 | 25 | else 26 | 27 | else if 28 | 29 | elif 30 | 31 | exceptions 32 | 33 | syntax 34 | 35 | syntax error 36 | 37 | valid code 38 | 39 | exception error 40 | 41 | try 42 | 43 | except 44 | 45 | flow chart 46 | 47 | 48 | -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_calculation_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/08-If-Else-Try-Except/images/flow_chart_calculation_program.png -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_calculation_program.xml: -------------------------------------------------------------------------------- 1 | 5Vhtb9owEP41fKwU4oTCx0Jpt2nVkFrt5dNkyJF4NXHmOAX263dOnATXoaVSoVpnich5fI7v7vGTM+mRyWpzLWmW3IgIeM/3ok2PXPZ8f3g+wqsGthUwGIQVEEsWVVC/BW7ZHzCgZ9CCRZBbhkoIrlhmgwuRprBQFkalFGvbbCm4vWpGY3CA2wXlLvqNRSoxYYVei38AFif1yn3PjKxobWyAPKGRWO9AZNojEymEqnqrzQS4zl2dl2re1Z7RxjEJqTpkgmK/VTpIp97ocn5x9fPrl2E4Ojs3vqltHTBEGL+5FVIlIhYp5dMWHUtRpBHop3p4l6gVx24fu79Aqa2hkBZKINQ+4bMQmbFbilRNBBeyXJFclQ3xXElx36QZEzR2YzRh56KQC3giMGOno9mZaDJzDWIFSm7RQAKnij3YbFOzaeLGrpk6Ewxd8T2zv/16I5jt3ezb+hGKyhiUmdWyg50dN1qo5OwF/BmHHygvTAg5rqhcVjlHxWj21glTcJvRMntr1KzNocvBPraWjHMLJ9iMfb2BOjZp7TFIBZsnqalHR3aK69t1K8d+rbFkR4pDbz+ZFg0vzfnwvWrGfxvNEP+0mvEdzVzk9wgUOciyROgrxV9arOYaesQ2vsgz3cUUU86Bi1jSFSY+A8nQN5CPx2btwNHkNxoRUuFHll9Tz57T3+BY+gsd/u5g477ylAat5ErI2R86Lw20DDO9w0rvwnEvvEREKzCvxKgnUM7iFPsclvpROmkMjwYXBlZaneMcyWRpfFdK9Sx4grJXYCMMiK2d0HfYCDrIeCyxVyNj4JABafSey08YnLD+fHzYsvmnG/p9RsIAZnOVj36ckbeoP4cT01lEni1InZGepv4Ex6s/+6Oy60+EkvGq/zb6ksD+6mMzeZCcdljyytbNpy0o3ZqC0ilAV2iOqjpoP1hohLivtqMVmk6igv9GaP5JhBaS0wrNPejNZOVgpTA8DxTcPTj8c+e7V5VdQAZHkx3ett87Kpbbj0Zk+hc= -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_more_complex_user_input_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/08-If-Else-Try-Except/images/flow_chart_more_complex_user_input_program.png -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_more_complex_user_input_program.xml: -------------------------------------------------------------------------------- 1 | 7Vpdc5s4FP01fswOIMDmMY6ddKbtbGfT2U2eOrKRQVmBqJBru79+JSSBsXA+GoOzmXomGekiQLrnnnOvZI/AVba9YbBIP9MYkZHnxNsRmI08bzKOxH9p2ClDGAbKkDAcK5PbGG7xT6SNjraucYzK1kBOKeG4aBuXNM/RkrdskDG6aQ9bUdJ+awETZBlul5DY1n9wzFO9rMBp7B8QTlLzZtfRVzJoBmtDmcKYbvZMYD4CV4xSrlrZ9goR6TvjF3Xf9ZGr9cQYyvlzbuD4O8/DfO5Es8Xl9be//5wE0cVYz43vzIJRLNavu5TxlCY0h2TeWKeMrvMYyac6opfyjIimK5oPiPOdhhCuORWm5gmfKC30uBXN+RUllFVvBNfVR9hLzui/tZuFg6b2GvWyS7pmS/TIwvQ4uZq9G7VnbhDNEGc7MYAhAjn+0UYb6qBJ6nH1rV8oFlPxHB3fngkEHd513JpHcMgSxPVdDTqisTeNxlRh9gL89IR/QLLWSyjFG7mNKiGCMRK9TYo5ui1g5b2N4GwbQxuDY2itMCEtOxAfPd4EUEeQmhkjxtH2UWjM1ajtYtPdNHR0DcfSPSpOnONgtmB4qc8n75Uz3nk4A7xhOeNZnCmYmuDIC7+vpR5P5zlHTE5J/OXrbCE75poFv1D2QjaFzyEhiNCEwUwMLBDDYrKIHV770lzojY9RBICy98zHOsE9RciwL0IGFqBf0dbWQC6NLecyVOKfcFENkLwsZMhVswumo2AmLJKSpWKnvAESnOSiTdBKPko6DYta4VKbuaTrtBRg4jz5WnH3wn8EshOgEfigTabAs9DwO8A45NzJwAgtMFAev+d8NAbnTkiubxOAidYZ0tSTcDnV51VpKhomTYHDNDX2hi3tbFm7hqQ8Kaxoi/mdNP8R6N59b4ALnNnuTs+h6tzXb351MCgsHvPmmTYE/mHWOxI1l4zB3d4wnYp6iKvICiu8UlWOqoBgJiU4UZWO2c3uhRtLabZYl8+V7q5Q6Aiatng7ThRVI3vMnPVWzfAb2JlzMqSMe8H/ldq/Tl+DQe+0nBzQEoSvpGX3e3yv+z1NXKgnnjZTOBal93Y0RDJ5IfcvmtNmH3PDEFS7HJ7CXHH99x6nO/f7tja4XWX1KfY4D3cP+K9yVjJ0v5jeMu/jh4xcgGG0oU7SdUcl6XHQo3AckP8XDy+AXQl0evIkAvNaXQhDt39dMC55oS58QmX5WxSeFgW/6ySyL1HoFv6JBXBvWwR3TymUbrypOuJM5X049Hm/feDfVb2Tt129x5ihJcdUnpkJaOVz+qjo/YlN0EErendsoaUOZmzxfZ9HNUPR8lCag/6+UuisKbxhqrO3UoD1V1c9KbjjgZG19fY5JdSM5ug91U2WBneEyPED84O9d9j1hdGJ6ibRbX5RoWKg+VkKmP8H -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_simple_print_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/08-If-Else-Try-Except/images/flow_chart_simple_print_program.png -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_simple_print_program.xml: -------------------------------------------------------------------------------- 1 | 5VZNc5swEP0tPXDMDEaG2Mf4qz20k8w40x47ilmDWoGIWGI7v74rEGCF2m1m4hxaDoz0tCut9u2T5LF5tv+oeZF+UTFIL/DjvccWXhBMrqf0N8ChAaIobIBEi7iBRj2wFs9gQd+ilYihdAxRKYmicMGNynPYoINxrdXONdsq6a5a8AQGwHrD5RD9JmJM7bZCv8c/gUjSduWRb0cy3hpboEx5rHZHEFt6bK6VwqaV7ecgTe7avDR+qxOjXWAacvwbBxSPmEf50p8uHm5W37/eTsLp1bWNDQ/thiGm/duu0piqROVcLnt0plWVx2Bm9amXYiapOaLmD0A8WAp5hYqgfobPShXWbqtynCupdL0iW9Uf4SVq9bNLMyVo1kRnQjq5aQuVqtIbOLPTUZdyKlVQGaA+kJ8GyVE8ufNzWzRJZ9e53ilBKwe+re+gLQRb3l3dtlMg1wmg9erZocZRGD1Uc/YK/mzAT1xWdgslrYhDVqUkxRj2dqlAWBe8TtaONOtyOOTgFFtbIaWDM/qsfVtAbXigEfbnKRxS0zpM3RS33V0vx1GrsfRIihP/NJkODa/N+eS/0UzwLpphwftqJhhoptBNgF4QPVbmPJ7dVlhU+KEHBpzTcV6YJuWVSwlSJZpnZFiAFhQh6Jdjd/3AxUQ4nTLW4BcWYXer/UmF0aVUGA5YvIf98OBDAzrJ1VCKZ/5QGxgxFqbO6ujCmRcuCDE6LBtJGgcuRZJTW8LWTGXyKOiBcGNhNBqdlUSmyJP7WrBX4zOUvQEb4Zi5CgqDARvj35DxUmhvRkY0IAPy+F++hBi73C1E3f5V2Bx6/dOaLX8B -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_simple_user_input_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/08-If-Else-Try-Except/images/flow_chart_simple_user_input_program.png -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_simple_user_input_program.xml: -------------------------------------------------------------------------------- 1 | 7Vhdb5swFP01eewEGNLw2KRJ97BplVpt7dPkBAe8GUyNaZL++tnYhhCTfqwhmbYhtbKPv6597rnXzgBM0vUVg3nymUaIDDwnWg/A5cDzRueh+C+BjQKGw0ABMcORgtwGuMFPSIOORkscoaLVkVNKOM7b4IJmGVrwFgYZo6t2tyUl7VVzGCMLuFlAYqPfcMQTva3AafCPCMeJWdl1dEsKTWcNFAmM6GoLAtMBmDBKuSql6wki8uzMuahxsz2ttWEMZfw1Azh+4Nkwmzrh5fxi9v3rl1EQnp1r2/jGbBhFYv+6ShlPaEwzSKYNOma0zCIkZ3VELeEpEUVXFH8gzjeaQlhyKqBmhk+U5rrfkmZ8Qgll1YpgVn0CLzijP+tjFgc0VtZJk/ZuWkMFLdkCPbNTtz5y4aqIpoizjRjHEIEcP7bnh9pp4rpfPfSaYrGy52j/9owjaPeu/dZMwSGLEdejGnZEYcuMBqo4ewN/2uBHSEq9hUKsyG1WCRGKkeytEszRTQ6rw1oJzbY5tDnYx9YSE9LCgfh0f+NAxjzEOFo/T6FNjRkQto/YVFeNHF2jsWRLiiNnP5ktGt565qN/RjPeUTQDvONqxrM0kzNl4MAbPpQyHo+nGUdMmiT+sjKdy4pps+gXkT2XRXHEkBBEaMxgKjrmiGFhLGK7bddNQ296DEMAFN6zHusE95Igh30JMrAIvUVrOwZyCbYOl6ECP8F51UHqMpcuV1kXjAfBpUCkJAulTjkAEhxnokzQUk4lzxGLu8KFhrmU67gQZOIsvq20e+Y/Q9kB2Ah80BZT4Fls+B1k7GruYGQMLTJQFv3N+ShwTp2QXN8WABOlE6SpF+lyqu+waSrsJU2B3TR17h33ameHtRkkxUFpRWvM7yT8IdC1+94IF7SyzZ22oarc1yv/8c6we2fxd8W8xxkuGIObrW46w/TgLqHlLXipLi/qYgNTGVljdYExIWvLi1hC03lZvDYidzHc4QvtmOw4YVj17DEh1i8wI1tgJ8TRMaOzd5I39kkCset0U/PeSAx2Mq7/XvF1r+O73es07KsZDxvmHUu4W88RIvU6l48PrVzzCLliCKonCk9gphT9/4HSnbh9OwK4XXfi33igiGrzC55yieZnUDD9BQ== -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/flow_chart_user_input_program.xml: -------------------------------------------------------------------------------- 1 | 7Vldb5swFP01eezEd+CxSZPuYdMqtdrap8kJDngzmBqnSfrrZ2MDISZpqgaWbo3Uyj74C5977r02A3ucrK8pyOKvJIR4YBnhemBfDSzLHwb8vwA2EvA8VwIRRaGEzBq4Rc9QgYZClyiEeaMhIwQzlDXBOUlTOGcNDFBKVs1mC4Kbs2YgghpwOwdYR3+gkMXqtVyjxj9DFMXlzKahniSgbKyAPAYhWW1B9mRgjykhTJaS9RhisXflvsh+0z1Pq4VRmLJjOjD0yFIvnRjB1exy+vP7N98NLoZqbWxTvjAM+furKqEsJhFJAZ7U6IiSZRpCMarBazFLMC+avPgLMrZRFIIlIxyqR/hCSKbaLUjKxgQTWsxoT4sfx3NGye9qm/kGjeTqxJL2vrSCcrKkc3jgTc1qy7mpQpJARje8H4UYMPTUHB8oo4mqdlXXG4L4zJah7NsqDUGZd2W35RAM0Agy1atmhxe2llFDBWev4E8t+AngpXqFnM/IdFYx5ooR7K1ixOBtBorNWnHNNjnUOdjH1gJh3MBt/lPtSwMqlwcpg+vDFOrUlB2C5haX1VUtR7PUWLwlRd/YT2aDhtfuuf/faMbqRTO21a9mLE0zGZULHFje41L449EkZZCKJfG/dJnMRKV8ptHPPXsminyLAcYQk4iChDfMIEV8sZDuPrupH3SmxyCwbYl3rMcqwL0kSK8rQboaoXdwrftAJsDG5lKYo2cwKxoIXWbC5IrVuaOBe8URIclcqlN0ABhFKS9juBBDiX1EPFe4VDATch3lnEyURneFdi+cA5SdgA3XsZtici2NDaeFjF3NnYwMTyMDpuG/HI+8Y+2/s4BkOroAKC/9hTD1Il1G8TttmAo6CVP2bpgaWv2mdrpbmwKcn5RWuEbsXsCfXFV76IxwTivd3Ks1FJWHauZTGwM/JBbkHNrefg4Ezm7U22M1l5SCzVYzFYo6sKtAMyu0kFmOzIBAIlxwJDOd8jS7ZW40JslsmR/ruttMocVoms7bMIKgaNlh5KyOaqW+bT1y+n26cct9r9I+oXxNo520t8rS35Gl7b1Rlu3zOFb7PLVdyBFPGykMTdJbJxoslDwT5xel6fIcc00hkKccFoNUav3jjNMe+x3dN5htaXVnZxzLOe90br+7qeJ+Vekk7lv2kYHf6yZb3BG+N+z5UsP+8AHd+gCn7eKxVx9g+hrHnZ0IzC0VS62ed9rQTzbv9X29r9/vv8NkPUQUzhki4oqMMynG6SKBd3xdoL0m8OZQY0vew+j+95xD+fnLctc1uyf7gsCr9RdZ2bz+rG1P/gA= -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/four_flow_chart_shapes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/08-If-Else-Try-Except/images/four_flow_chart_shapes.png -------------------------------------------------------------------------------- /website/docs/08-If-Else-Try-Except/images/four_flow_chart_shapes.xml: -------------------------------------------------------------------------------- 1 | xZZNj5swEIZ/DcdKBIc0HDdf20vVSlm1x8oLE7BqbGqGJtlf3zGYEOKs9kNN6wOy3zFj+31sQ8CW5eHe8Kr4rDOQQRRmh4Ctgiiaf0zoaYVjJ8xmcSfkRmSdNBmErXgCJ4ZObUQG9agjai1RVGMx1UpBiiONG6P34247LcejVjwHT9imXPrqd5Fh4ZYVh4P+CURe9CNPQhcped/ZCXXBM70/k9g6YEujNXa18rAEab3rfene2zwTPU3MgMLXvIDiF6qZWofJ6vFu8+Pbl3mcfHBZfnPZuAXXyA0GNteGnqAyN3s89pZQWnKfGot9IRC2FU9tZE/8SSuwlNSaULVGo3+ebKMFL3Za4VJLbdpMbNMWqwspRzqj4vpv3chXFtzPHgzC4UxyBtyDLgHNkbr00cTBcLuxb+4HtJOeV3GGde407nZTfso8GE4V5/kb/I88/4WqmsF/3WDbvEBAe6myVTKDSwlS54aX5FcFRtDEwFzGvg6Bm1FLEsY6/cbUTkfqJWyzW2FjHja6MdJGchRa1R4uoxuVgU0Yvsv/sc+2XPH5eU43QMDY/0Yw9W8ukPQFIACt+aZJsTHgsyh0+djU7z0Hr/H7glcYJkkY/h0Op++i4zCd+hzm//ICiz0MD3DwLyy04sheA7V44o9tB2tOpYXCdnbxIohXpPAGdd39ENgXuBS5orqEnU1lPRN06u6cjNryqwmnUPmDbaxoj9z0UMRTNj4UceTBmF6BEb0dBjWHP4U2dva7xdZ/AA== -------------------------------------------------------------------------------- /website/docs/09-Loops/09.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # Loops 3 | ## Introduction 4 | Repetition structures allow the same piece of code to run multiple times. Two repetion structures in Python are for loops and while loops. For loops run a set number of times. While loops run as long as a specific logical condition is true. 5 | 6 | By the end of this chapter you will be able to: 7 | 8 | * use a while loop 9 | 10 | * use a for loop 11 | 12 | * use the break statement 13 | 14 | * use the continue statement 15 | 16 | * construct flowcharts that describe programs with loops 17 | 18 | 19 | -------------------------------------------------------------------------------- /website/docs/09-Loops/09.05-Summary.md: -------------------------------------------------------------------------------- 1 | 2 | ## Summary 3 | Repetition structures allow the same piece of code to run multiple times. 4 | 5 | In this chapter, you learned how to write for loops and while loops in Python. For loops run a block of code a definite number of times. You learned how to use Python's ```range()``` function in a for loops and how to use a list or string in a for loop. A while loop runs a block of code as long as a logical condition is true. The keywords ```break``` and ```continue``` cause for and while loops to exit early. 6 | 7 | At the end of the chapter, you learned how to build flowcharts that describe programs with for loops and while loops. 8 | ### Key Terms and Concpets 9 | repetition structure 10 | 11 | loop 12 | 13 | while loop 14 | 15 | for loop 16 | 17 | iterate 18 | 19 | break 20 | 21 | continue 22 | 23 | infinite loop 24 | 25 | flowchart 26 | 27 | 28 | -------------------------------------------------------------------------------- /website/docs/09-Loops/images/flow_chart_of_program_that_contains_a_for_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/09-Loops/images/flow_chart_of_program_that_contains_a_for_loop.png -------------------------------------------------------------------------------- /website/docs/09-Loops/images/flow_chart_of_program_that_contains_a_for_loop.xml: -------------------------------------------------------------------------------- 1 | 3VhNc9owEP01HNMRsk3wMRCSdqZJM5NMmp46AgtbrWw5soghv74rW8YIGUoz0HbiQyI9rz523+6TTM8bp8trSfLkRkSU9zCKlj3vsofx8DyEvxpY1cBgENRALFlUQ/0WuGev1IDIoAsW0cIyVEJwxXIbnIksozNlYURKUdpmc8HtVXMSUwe4nxHuol9ZpBLjVoBa/CNlcdKs3EfmTUoaYwMUCYlEuQF5k543lkKoupUux5Tr2DVxqcdd7Xi73pikmTpkgGLPKhtkExReTi+uvj9+GQbh2bnZm1o1DtMI/DddIVUiYpERPmnRkRSLLKJ6VgS9RKUcmn1o/qBKrQyFZKEEQO0Mn4XIjd1cZGosuJDVit5V9QBeKCl+rsMMARq5Phq3C7GQM7rHMWOnvdkYaCJzTUVKlVyBgaScKPZis01M0sRru/XQO8FgKxiZ/MZNIpj0xgNkT6GIjKkyo1p2oLGxjRaqOPsD/syGXwhfGBcKWFG5rHIOFaPZKxOm6H1OquiVULM2hy4Hu9iaM84t3IPH2DcJ1JGkzY6pVHS5l5rmbWiHuOmWbTn2mxpLNkpxiHaTadGwJ+Z+ica34+ktHt9FN+L20yMryzPfiXmmh2QzSUkBWoXRVG+/75Jw+tL6LX2oetaltVUfb6s1fJrSGm6VFjqstC6kJKsNs1wbFLvX8cPuddoUqWc8at1iJ4dyWe+qhwfPC30mjDjQyrK4BZyEgiMl100gjXBOuYglScEwp5LBDqncfnfXvjiZEISh59X4kYXA97aICvFhSrCtyW9Rgk4WA4fFB7p0xVdp0AqupAV7JdPKQBejyVGwDka94BIQXeRFXe96AOEszqDN6VxPpYPG4JJyYWClBWBUAJmQMA+VGoBM7absCGwEvmex4QUuG34HGfhUZAwcMmgWveeD0B/865PQVTEQK5LqSGbTQv9DtaLVGK9FDGUdoD0MDMJjHp90ydTTRvubNvkQ/EcHa2d8T3Nn9bGdRx7GBx2sbzj7Or3yOu9P6xSITZY0X4Dv6wL1F3ne/jbx/ZN9m+z2yuJ5DkE05a/7+qIFX/OdxS4TkU4XxaE63UVQB5W2UiMUhpXl/mPSUegOkneK9vrW2lxazjsuLahDtPvb190DVBu67e8JNY3tjzLe5Bc= -------------------------------------------------------------------------------- /website/docs/09-Loops/images/flow_chart_of_program_that_contains_a_while_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/09-Loops/images/flow_chart_of_program_that_contains_a_while_loop.png -------------------------------------------------------------------------------- /website/docs/09-Loops/images/flow_chart_of_program_that_contains_a_while_loop.xml: -------------------------------------------------------------------------------- 1 | 3VjBcpswEP0ajs7IYLA5xo6ddqZJM5NM2p46spFBjUBEiGDn6yuBAAswcRI709QHj/RYwe6+fVqEYc3CzSWDcXBFPUQME3gbw7owTHMydsW/BLYF4Dh2AfgMewU0rIFb/IwUCBSaYg8lmiGnlHAc6+CKRhFacQ2DjNFMN1tToj81hj5qAbcrSNroD+zxQIVlgxr/grAflE8eAnUlhKWxApIAejTbgay5Yc0YpbwYhZsZIjJ3ZV6KdYs9VyvHGIr4IQs4fuSRE82Be7E8X/y+/z6x3cFY+ca3ZcDIE/GrKWU8oD6NIJnX6JTRNPKQvCsQs4CHRAyHYvgHcb5VFMKUUwHVd/hGaazs1jTiM0ooy59oLfKfwBPO6EOVZpGgaTtGFXZCU7ZCPYEpOxnNzkKVmUtEQ8TZVhgwRCDHTzrbUBWNX9lVS28oFq6YQNW3WRaCKm/TAfotOGQ+4mpVzY4Y7LhRQzlnr+BPOfwESapCSMQTeZtVQoRiJHtZgDm6jWGevUxoVuewzcE+ttaYEA23xE/ZlwXUUaSlx4hxtOmlprzq6ikeWmqe1XocliILdrQ4AfvZ1HjoSfooA7Pr2fLanN14V/T66z3OsoF9TNGgDeY/JXxmq9mvV8rpRcpA/qvk1NDE2/RlfoicrPHHyslsyQkmDwJIE8Ty7iH/oWE6RKRruhQzx5ejmCY4D9sEURoupXGjQsTuH8uhyDUkBBHqMxjKlYhh4TVizWs39YWTadZ1LavAj63ZSWNbHHdodtSh2eb2+RbNdjJrt5i9Q5v2PsklqCWXoQQ/w2VuAHKqRe3l3tlTw74QiNRmUshULoAE+5EYE7SWt5JJw+J94lzBXOp2mggyceTf5SIejHooOwIb9sjSVWWbLTa6yDBPRYbTIgNF3v/cs5yu+v/QnjVupTwypAMODGU28/1MAKDNwunfBw9vYEo2AnXf3M4609NP5wCcOXYpmne2OMtstDhwWIs7Zwxud8zUPrT/OY0SHFmN48EL9qVfddEVHjRWl+7Q9TpB7+3JndRM+ivX/xyVe/paPfKrl22f7NVrf1QH0SzSuWiRzQIaLtPk0GbRubm0ydTbBQCum1v29+pWm+igee9WUxVyKcNJR+cAHZ1j2NxHjtY6huYxpfXvn3e6k/AxqnNO9/2gJyxNdjErPBTSe0ypfropkUqW0TKJq0R/5uPOu0TbPO7YzumOO2JafzMsyqD+8GrN/wI= -------------------------------------------------------------------------------- /website/docs/09-Loops/images/four_flow_chart_shapes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/09-Loops/images/four_flow_chart_shapes.png -------------------------------------------------------------------------------- /website/docs/09-Loops/images/four_flow_chart_shapes.xml: -------------------------------------------------------------------------------- 1 | xZZNj5swEIZ/DcdKBIc0HDdf20vVSlm1x8oLE7BqbGqGJtlf3zGYEOKs9kNN6wOy3zFj+31sQ8CW5eHe8Kr4rDOQQRRmh4Ctgiiaf0zoaYVjJ8xmcSfkRmSdNBmErXgCJ4ZObUQG9agjai1RVGMx1UpBiiONG6P34247LcejVjwHT9imXPrqd5Fh4ZYVh4P+CURe9CNPQhcped/ZCXXBM70/k9g6YEujNXa18rAEab3rfene2zwTPU3MgMLXvIDiF6qZWofJ6vFu8+Pbl3mcfHBZfnPZuAXXyA0GNteGnqAyN3s89pZQWnKfGot9IRC2FU9tZE/8SSuwlNSaULVGo3+ebKMFL3Za4VJLbdpMbNMWqwspRzqj4vpv3chXFtzPHgzC4UxyBtyDLgHNkbr00cTBcLuxb+4HtJOeV3GGde407nZTfso8GE4V5/kb/I88/4WqmsF/3WDbvEBAe6myVTKDSwlS54aX5FcFRtDEwFzGvg6Bm1FLEsY6/cbUTkfqJWyzW2FjHja6MdJGchRa1R4uoxuVgU0Yvsv/sc+2XPH5eU43QMDY/0Yw9W8ukPQFIACt+aZJsTHgsyh0+djU7z0Hr/H7glcYJkkY/h0Op++i4zCd+hzm//ICiz0MD3DwLyy04sheA7V44o9tB2tOpYXCdnbxIohXpPAGdd39ENgXuBS5orqEnU1lPRN06u6cjNryqwmnUPmDbaxoj9z0UMRTNj4UceTBmF6BEb0dBjWHP4U2dva7xdZ/AA== -------------------------------------------------------------------------------- /website/docs/10-Symbolic-Math/10.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # Symbolic Math 3 | ## Introduction 4 | By the end of this chapter you will be able to: 5 | 6 | * Define Python variables as symbolic math variables 7 | 8 | * Define mathematical expressions and equations using symbolic math variables 9 | 10 | * Solve for symbolic math variables in terms of other symbolic math variables 11 | 12 | * Derive numerical solutions using symbolic math variable substitution 13 | 14 | * Solve linear and quadratic equations using symbolic math 15 | 16 | * Solve systems of equations using symbolic math 17 | 18 | 19 | -------------------------------------------------------------------------------- /website/docs/10-Symbolic-Math/10.01-SymPy.md: -------------------------------------------------------------------------------- 1 | 2 | ## SymPy 3 | SymPy [http://www.sympy.org](http://www.sympy.org) is a Python library for _symbolic math_. 4 | 5 | In symbolic math, symbols are used to represent mathematical expressions. An example of a symbolic math expression is below. 6 | 7 | $$ x^{2} + y^{2} = z $$ 8 | 9 | The expression contains the symbols $x$, $y$, and $z$. 10 | 11 | If we define a second symbolic math expression: 12 | 13 | $$ x = a + b $$ 14 | 15 | then we can substitue in $a + b$ for $x$. 16 | 17 | The result is the expression: 18 | 19 | $$ (a + b)^{2} + y^{2} = z $$ 20 | 21 | $$ a^{2} + 2ab + b^{2} + y^{2} = z $$ 22 | 23 | Solving for $y$ in terms of $a$, $b$ and $z$ results in: 24 | 25 | $$ y = \sqrt{z - a^{2} - 2ab - b^{2}} $$ 26 | 27 | In the symbolic math substitution above, symbolic math variables were rearranged, grouped and inserted. None of the variables were equal to a specific number, like 5 or 0.001, but we can still solve for one variable in terms of the other variables when we use symbolic math. 28 | If we have numerical values for $z$, $a$ and $b$, we can use Python to calculate the value of $y$. 29 | 30 | But if we don't have numerical values for $z$, $a$ and $b$, Python and the SymPy package can be used to rearrange terms and solve for one variable in terms of the other. 31 | 32 | Working with mathematical symbols in a programmatic way instead of working with numerical values in a programmatic way is called _symbolic math_. 33 | 34 | 35 | -------------------------------------------------------------------------------- /website/docs/10-Symbolic-Math/10.02-Installing-SymPy.md: -------------------------------------------------------------------------------- 1 | 2 | ## Installing SymPy 3 | To work with symbolic math in Python, the SymPy library needs to be installed. SymPy comes pre-installed with the Anaconda distribution of Python. 4 | If you are not using the Anaconda distribution of Python, SymPy can be installed with the **Anaconda Prompt**. Use the command: 5 | 6 | ```text 7 | > conda install sympy 8 | ``` 9 | Alternatively, you can install SymPy using the Python package manager **pip**. The command below installs SymPy into the current environment. 10 | 11 | ```text 12 | $ pip install sympy 13 | ``` 14 | You can confirm your SymPy installation by opening up the Python REPL and typing the two commands below. 15 | ```text 16 | >>> import sympy 17 | >>> sympy.__version__ 18 | '1.4' 19 | ``` 20 | The ouput above shows SymPy version ```'1.4'``` is installed. 21 | 22 | 23 | -------------------------------------------------------------------------------- /website/docs/10-Symbolic-Math/10.08-Summary.md: -------------------------------------------------------------------------------- 1 | 2 | ## Summary 3 | 4 | 5 | In this chapter, you learned about symbolic math and how to complete symbolic math calculations with Python the SymPy package. Symbolic math treats variables as mathematical symbols rather than defining variables as numbers. 6 | 7 | At the start of the chapter, you learned how to create symbolic math variables with SymPy's ```symbols()``` function. 8 | 9 | Symbolic math variables can be combined into symbolic math expressions and symbolic math equations. You learned how to substitute variables and numbers into symbolic math expressions and equations. 10 | 11 | At the end of the chapter, you learned how to solve linear and quadratic equations with SymPy. 12 | 13 | The final example in the chapter was a multi-variable statics problem where two equations were solved for two unknowns. 14 | ### Key Terms and Concepts 15 | symbolic math 16 | 17 | symbolic variable 18 | 19 | object 20 | 21 | numerical calculation 22 | 23 | systems of equations 24 | 25 | expression 26 | 27 | equation 28 | 29 | substitution 30 | 31 | evaluate 32 | 33 | linear equation 34 | 35 | quadratic equation 36 | ### SymPy Functions and Methods 37 | | SymPy Function | Description | Example | 38 | | --- | --- | --- | 39 | | ```symbols()``` | Define a symbolic math variable | ```x, y = symbols('x y')``` | 40 | | ```.subs()``` | Substitute a variable or value | ```expr.subs(x, 2)``` | 41 | | ```Eq()``` | Define a SymPy equation | ```eq1 = Eq(4*x + 2)``` | 42 | | ```solve()``` | Solve a SymPy expression or equation | ```solve((eq1,eq2), (x, y))``` | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /website/docs/10-Symbolic-Math/images/statics_problem_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/10-Symbolic-Math/images/statics_problem_diagram.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/11.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # Python and External Hardware 3 | ## Introduction 4 | By the end of this chapter you will be able to: 5 | 6 | * Connect external hardware to a computer running Python 7 | 8 | * Install the PySerial library 9 | 10 | * Read data over a serial connection using Python 11 | 12 | * Save data coming in over a serial connection using Python 13 | 14 | * Write data to a serial line using Python 15 | 16 | * Read data from a sensor using Python 17 | 18 | * Control an LED using Python 19 | 20 | 21 | -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/11.06-Project-Ideas.md: -------------------------------------------------------------------------------- 1 | 2 | ## Project Ideas 3 | P11.01 Use Python and PySerial measure light levels using a photoresistor connected to an Arduino. 4 | 5 | P11.02 Use Python and PySerial to control a relay connected to an Arduino 6 | 7 | P11.03 Use Python and PySerial to read a pH sensor connected to an Arduino 8 | 9 | P11.04 Use Python and PySerial to read a photosensor connected to an Arduino and turn on and off an LED based on light level. 10 | 11 | 12 | P11.05 Use Python and PySerial to read a temperature connected to an Arduino and send temperature measurements up to an IoT cloud server, like io.adafruit.com using the Requests package. 13 | 14 | P11.06 Use Python and PySerial to turn on and off an LED connected to an Arduino based on values stored on an IoT cloud server, like io.adafruit.com, using the Requests package. 15 | 16 | 17 | -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/Arduino_LED_fritzing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/Arduino_LED_fritzing.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/Arrow_to_Upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/Arrow_to_Upload.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/Check_to_Verify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/Check_to_Verify.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/Examples_Com_PhysicalPixel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/Examples_Com_PhysicalPixel.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/SerialMonitor_H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/SerialMonitor_H.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/Tools_SerialMonitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/Tools_SerialMonitor.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/Tools_SerialPlotter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/Tools_SerialPlotter.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/arduino_LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/arduino_LED.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/arduino_download_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/arduino_download_page.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/arduino_led.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/arduino_led.fzz -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/arduino_potentiometer.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/arduino_potentiometer.fzz -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/download_Arduino_IDE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/download_Arduino_IDE.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/file-examples-communication-physicalpixel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/file-examples-communication-physicalpixel.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/matplotlib_potentiometer_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/matplotlib_potentiometer_plot.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/redboard_LED.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/redboard_LED.fzz -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/redboard_LED_bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/redboard_LED_bb.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/redboard_LED_potentiometer.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/redboard_LED_potentiometer.fzz -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/redboard_pot_led_fritzing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/redboard_pot_led_fritzing.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/serial_monitor_L.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/serial_monitor_L.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/serial_monitor_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/serial_monitor_output.png -------------------------------------------------------------------------------- /website/docs/11-Python-and-External-Hardware/images/serial_plotter_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/11-Python-and-External-Hardware/images/serial_plotter_output.png -------------------------------------------------------------------------------- /website/docs/12-MicroPython/12.00-Introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # MicroPython 3 | ## Introduction 4 | By the end of this chapter you will be able to: 5 | 6 | * Install MicroPython on a microcontroller 7 | 8 | * Run Python commands on a microcontroller using the MicroPython REPL 9 | 10 | * Save module files and run Python scripts on a microcontroller 11 | 12 | * Use MicroPython to read data off a sensor 13 | 14 | * Use MicroPython to switch on and off a light 15 | 16 | 17 | -------------------------------------------------------------------------------- /website/docs/12-MicroPython/12.07-Summary.md: -------------------------------------------------------------------------------- 1 | 2 | ## Summary 3 | In this chapter, you learned about MicroPython. MicroPython is a small slimed down port of the Python programming language designed to run on small cheap microcontrollers. The first part of the chapter introduced MicroPython. "Regular" Python consumes to much hard disk space and RAM to be run installed on a microcontroller. But MicroPython is very small for a programming language. It only takes up less than 1MB on a microcontroller. 4 | 5 | The next section of the chapter involved how to install MicroPython on a microcontroller. To install MicroPython on a microcontroller, use a package called **esptool** and upload a .bin firmware file to the board. 6 | 7 | The rest of the chapter involved two projects. Blinking an LED with MicroPython and reading a sensor with MicroPython. 8 | 9 | To blink an LED on a microcontroller, you need to connect to the microcontroller with a program called PuTTY. Through a PuTTY terminal, you can use MicroPython's ```machine``` module to write high and low values to the pins on the microcontroller. 10 | 11 | An MCP9808 temperature sensor was read using MicroPython in the second project. The sensor first needed to be wired up to the microcontroller, and then the MicroPython's ```ic2``` class was used to read data off the sensor. At the end of the project, a Python package called **ampy** was used to upload a **_.py_** file to the microcontroller. 12 | ### Key Terms and Concepts 13 | MicroPython 14 | 15 | microcontroller 16 | 17 | MicroPython REPL 18 | 19 | REPL prompt 20 | 21 | baud rate 22 | 23 | port 24 | 25 | pyboard 26 | 27 | ESP8266 28 | 29 | resource intensive 30 | 31 | esptool 32 | 33 | .bin firmware file 34 | 35 | driver 36 | 37 | USB data cable 38 | 39 | PuTTY 40 | 41 | MCP9808 temperature sensor 42 | 43 | ampy 44 | 45 | Hello World 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /website/docs/12-MicroPython/12.08-Project-Ideas.md: -------------------------------------------------------------------------------- 1 | 2 | ## Project Ideas 3 | P12.01 Use MicroPython and a microcontroller to read a potentiometer and print the results to the screen of a computer. 4 | 5 | P12.02 Use MicroPython, a microcontroller, and a light sensor to measure light level. Light up different numbers of LED's based on the measured light level. 6 | 7 | P12.03 Use MicroPython and a microcontroller to read a potentiometer and print the results to the screen of a computer. 8 | 9 | P12.04 Use MicroPython to turn on and off an LED based on a value stored on an IoT cloud server, like io.adafruit.com. 10 | 11 | P12.05 Use MicorPython and a temperature sensor connected to a microcontroller to measure the temperature and send the temperature to a computer running Python and PySerial. Use Matplotlib on the computer to plot the temperature. 12 | 13 | P12.06 Use MicroPython and uRequests package to send temperature sensor measurements up to an IoT cloud server, like io.adafruit.com. 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/Anaconda_Prompt.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/Anaconda_Prompt.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/Anaconda_choose_python_version.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/Anaconda_choose_python_version.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/Anaconda_downloads_page.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/Anaconda_downloads_page.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/MicroPython_in_jupyter_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/MicroPython_in_jupyter_notebook.png -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/REPL_prompt.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/REPL_prompt.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/active_new_conda_env.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/active_new_conda_env.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/bin_file_to_new_directory.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/bin_file_to_new_directory.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/bin_in_dir.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/bin_in_dir.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/conda_activate.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/conda_activate.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/conda_create_new_virtualenv.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/conda_create_new_virtualenv.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/conda_install_mpy-repl-tool.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/conda_install_mpy-repl-tool.jpg -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/conda_list.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/conda_list.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/conda_there-jupyter-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/conda_there-jupyter-setup.png -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/device_manager_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/device_manager_menu.png -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/download_putty.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/download_putty.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/download_silabs_driver.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/download_silabs_driver.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/downloads_folder.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/downloads_folder.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/esptool_erase_flash.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/esptool_erase_flash.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/esptool_help.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/esptool_help.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/esptool_write_flash.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/esptool_write_flash.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/feather_huzzah_temp_sensor_fritzing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/feather_huzzah_temp_sensor_fritzing.png -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/find_device_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/find_device_manager.png -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/firmware_download_page.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/firmware_download_page.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/import_port_diag.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/import_port_diag.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/micropython_modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/micropython_modules.png -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/mkdir_micropython.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/mkdir_micropython.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/pip_install_esptool.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/pip_install_esptool.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/putty_config.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/putty_config.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/putty_in_start_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/putty_in_start_menu.png -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/sys_dot_implementation_and_platform.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/sys_dot_implementation_and_platform.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/sys_dot_platform.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/sys_dot_platform.PNG -------------------------------------------------------------------------------- /website/docs/12-MicroPython/images/there.jupyter-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/12-MicroPython/images/there.jupyter-setup.png -------------------------------------------------------------------------------- /website/docs/99-Appendix/99.00-Appendix.md: -------------------------------------------------------------------------------- 1 | 2 | # Appendix 3 | ## Contents 4 | The following is detailed in the appendix: 5 | 6 | * Reserved and Key Words in Python 7 | 8 | * ASCII Character Codes 9 | 10 | * Virtual Environments 11 | 12 | * NumPy Math Functions 13 | 14 | * Git and GitHub 15 | 16 | * LaTeX Math 17 | 18 | * Problem Solving with Python 3.7 Edition Book Construction 19 | 20 | * Contributions 21 | 22 | * Cover Artwork 23 | 24 | * About the author 25 | 26 | 27 | -------------------------------------------------------------------------------- /website/docs/99-Appendix/99.01-Reserved-and-Key-Words-in-Python.md: -------------------------------------------------------------------------------- 1 | 2 | ## Reserved and Keywords in Python 3 | The following are reserved and keywords in Python. These words should not be used as the names for user-defined variables, functions, classes, methods or modules. Python's keywords can be accessed with the following code: 4 | ```python 5 | import keyword 6 | print(f'There are {len(keyword.kwlist)} key words') 7 | for keywrd in keyword.kwlist: 8 | print(keywrd) 9 | ``` 10 | 11 | ```text 12 | There are 33 key words 13 | False 14 | None 15 | True 16 | and 17 | as 18 | ... 19 | 20 | ``` 21 | ### Logical Keywords 22 | ```text 23 | True 24 | False 25 | not 26 | and 27 | or 28 | is 29 | None 30 | in 31 | ``` 32 | ### Control Flow Key Words 33 | ```text 34 | if 35 | else 36 | elif 37 | for 38 | while 39 | break 40 | continue 41 | pass 42 | try 43 | except 44 | finally 45 | raise 46 | return 47 | yield 48 | ``` 49 | ### Definition Key Words 50 | ```text 51 | def 52 | global 53 | nonlocal 54 | class 55 | lambda 56 | with 57 | assert 58 | del 59 | ``` 60 | ### Module Keywords 61 | ```text 62 | import 63 | from 64 | as 65 | ``` 66 | 67 | 68 | -------------------------------------------------------------------------------- /website/docs/99-Appendix/99.04-NumPy-Math-Functions.md: -------------------------------------------------------------------------------- 1 | 2 | ## NumPy Math Functions 3 | The code below prints out all NumPy functions and methods: 4 | 5 | ```python 6 | import numpy as np 7 | for func in dir(np): 8 | print(func) 9 | ``` 10 | ### NumPy Array Creation and Manipulation Functions and Methods 11 | ``` 12 | np.array 13 | np.arange 14 | np.ndarray 15 | np.zeros 16 | np.ones 17 | np.matrix 18 | np.traspose 19 | np.size 20 | np.shape 21 | np.reshape 22 | np.meshgrid 23 | np.dot 24 | np.cross 25 | np.asmatrix 26 | np.asarray 27 | ``` 28 | 29 | ### NumPy Exponential and Logarithmic Functions and Methods 30 | ``` 31 | np.log 32 | np.log10 33 | np.log1p 34 | np.log2 35 | np.logaddexp 36 | np.logaddexp2 37 | np.exp 38 | np.exp2 39 | np.sqrt 40 | np.power 41 | np.e 42 | ``` 43 | 44 | ### NumPy Trigonometric Functions and Methods 45 | ``` 46 | np.pi 47 | np.sin 48 | np.cos 49 | np.tan 50 | np.arcsin 51 | np.arccos 52 | np.arctan 53 | np.arcsinh 54 | np.arccosh 55 | np.arctanh 56 | np.arctan2 57 | np.radians 58 | np.rad2deg 59 | np.deg2rad 60 | np.radians 61 | np.sinc 62 | np.sinh 63 | np.tanh 64 | np.angle 65 | ``` 66 | 67 | ### NumPy Statistics Functions and Methods 68 | ``` 69 | np.mean 70 | np.average 71 | np.median 72 | np.std 73 | np.var 74 | np.correlate 75 | np.histogram 76 | np.amin 77 | np.amax 78 | np.ptp 79 | np.percentile 80 | ``` 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /website/docs/99-Appendix/99.06-LaTeX-Math.md: -------------------------------------------------------------------------------- 1 | 2 | ## LaTeX Math 3 | LaTeX math can be included in Jupyter notebook markdown cells. LaTeX math can also be included in parts of Matplotlib plots like axis labels and text fields. 4 | 5 | Inline LaTeX math commands need to be enclosed by the dollar signs. 6 | 7 | ```text 8 | The angle is $2\pi$ radians 9 | ``` 10 | 11 | The markup above is rendered as: 12 | 13 | The angle is $2\pi$ radians 14 | 15 | A table of useful LaTeX commands and the associated output is below. Note curly braces ```{ }``` are used to surround LaTeX math elements and a backslash ``` \ ``` is used before LaTeX commands. 16 | 17 | 18 | | LaTeX Command | Output | 19 | | --- | --- | 20 | | ```2^{3}``` | $2^{3}$ | 21 | | ```H_{2}``` | $H_{2}$ | 22 | | ```\frac{3}{4}``` | $\frac{3}{4}$ | 23 | | ```\pi``` | $\pi$ | 24 | | ```\Delta``` | $\Delta$ | 25 | | ```\epsilon``` | $\epsilon$ | 26 | | ```\sigma``` | $\sigma$ | 27 | | ```2 \times 3``` | $2 \times 3$ | 28 | | ```\int_{a}^{b} x^2 dx ``` | $\int_{a}^{b} x^2 dx$ | 29 | | ```\sum``` | $\sum$ | 30 | | ```\vec{F}``` | $\vec{F}$ | 31 | | ```\hat{k}``` | $\hat{k}$ | 32 | | ```\bar{x}``` | $\bar{x}$ | 33 | | ```15 \%``` | $15 \%$ | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /website/docs/99-Appendix/99.08-Contributions.md: -------------------------------------------------------------------------------- 1 | 2 | ## Contributions 3 | Any corrections, typos or suggestions to improve the text can be emailed to: 4 | 5 | > [errata@problemsolvingwithpython.com](mailto:errata@problemsolvingwithpython.com) 6 | 7 | Please include the chapter number and section number in your email. Include in your email if you would like to remain anonymous or have your name recognized in the contributor list. Thank-you in advance for improving the text for others. 8 | ### Contributor List 9 | 10 | * Levi, Blessing, and Ngan helped improve some review questions 11 | 12 | * Justin improved a worked example and corrected typos in review questions and Chapter 5. 13 | 14 | 15 | -------------------------------------------------------------------------------- /website/docs/99-Appendix/99.09-Cover-Artwork.md: -------------------------------------------------------------------------------- 1 | 2 | ## Cover Artwork 3 | Mike Schultz is a printmaker and illustrator who has taught art to Burmese migrant youth on the Thailand-Burma border. He currently lives and works in Portland, Oregon with his cat, Siam. 4 | 5 | Instagram: [```@mike_schultz_studio```](https://www.instagram.com/mike_schultz_studio/) 6 | 7 | Website: [mikeschultzstudio.com](http://mikeschultzstudio.squarespace.com/) 8 | 9 | 10 | -------------------------------------------------------------------------------- /website/docs/99-Appendix/99.10-About-the-Author.md: -------------------------------------------------------------------------------- 1 | 2 | ## About the Author 3 | Peter D. Kazarinoff, PhD is a full-time faculty member in Engineering and Engineering Technology at Portland Community College in Portland, Oregon. Peter earned a PhD in Materials Science and Engineering from the University of Washington and a BA from Cornell University. He teaches courses in Engineering Programming, Materials Science, Manufacturing and others at Portland Community College. 4 | 5 | He blogs at: [pythonforundergradengineers.com](https://pythonforundergradengineers.com/) 6 | 7 | Peter lives in beautiful Portland, Oregon with his wife and two kids. 8 | 9 | 10 | -------------------------------------------------------------------------------- /website/docs/figures/anaconda_download_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/3990d0f31fb7b97532390bd1ce8155b4a1131ec6/website/docs/figures/anaconda_download_page.png -------------------------------------------------------------------------------- /website/docs/index.md: -------------------------------------------------------------------------------- 1 | # Problem Solving with Python 2 | 3 | If you like this book, please consider purchasing a hard copy version on [amazon.com](http://amazon.com). 4 | 5 | ## Overview 6 | 7 | * You will find the book chapters on the left hand menu 8 | * You will find navigation within a section of a chapter (one webpage) on the righthand menu 9 | * Sources for this text are stored on GitHub at [github.com/professorkazarinoff/Problem-Solving-with-Python-37-Edition](github.com/professorkazarinoff/Problem-Solving-with-Python-37-Edition) 10 | 11 | ## Hard Copy 12 | 13 | If you find the text useful, please consider supporting the work by [purchasing a hard copy of the text](https://www.amazon.com/Problem-Solving-Python-3-7-open-source/dp/1693405415). 14 | 15 | ## License 16 | 17 | This work is licensed under a [GNU General Public License v3.0](https://github.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition/blob/master/LICENSE) 18 | -------------------------------------------------------------------------------- /website/mkdocs_config.yml: -------------------------------------------------------------------------------- 1 | # mkdocs.yml 2 | 3 | site_name: 'Problem Solving with Python' 4 | site_description: 'Website companion for the book Problem Solving with Python by Peter D. Kazarinoff' 5 | site_author: 'Peter D. Kazarinoff' 6 | repo_url: 'https://github.com/ProfessorKazarinoff/Problem-Solving-with-Python-37-Edition' 7 | 8 | # Configuration 9 | theme: 10 | name: 'material' 11 | language: 'en' 12 | palette: 13 | primary: 'cyan' 14 | accent: 'indigo' 15 | font: 16 | text: 'Roboto' 17 | code: 'Roboto Mono' 18 | 19 | # Markdown Extensions 20 | markdown_extensions: 21 | - admonition 22 | - footnotes 23 | - pymdownx.arithmatex 24 | 25 | # Javascript for MathJax 26 | extra_javascript: 27 | - 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML' 28 | 29 | # Extra css 30 | extra_css: 31 | - 'stylesheets/extra.css' 32 | 33 | # Theme Customization 34 | extra: 35 | social: 36 | - type: 'globe' 37 | link: 'https://pcc.edu' 38 | - type: 'github' 39 | link: 'https://github.com/professorkazarinoff' 40 | - type: 'twitter' 41 | link: 'https://twitter.com/pkazarinoff' 42 | 43 | # Copyright 44 | copyright: 'GNU General Public License v3.0' 45 | 46 | # Google Analytics 47 | google_analytics: 48 | - UA-116330557-2 49 | - auto 50 | --------------------------------------------------------------------------------