├── README.md └── examples ├── lesson01 ├── RollDieDynamic.py ├── TestDrive.ipynb └── snippets_ipynb │ ├── .ipynb_checkpoints │ ├── IPython_selfcheck-checkpoint.ipynb │ └── TestDrive-checkpoint.ipynb │ ├── IPython_selfcheck.ipynb │ ├── TestDrive.ipynb │ └── files │ └── art │ └── check.png ├── lesson02 ├── fig02_01.py ├── fig02_02.py ├── snippets_ipynb │ ├── .ipynb_checkpoints │ │ ├── 02_02-checkpoint.ipynb │ │ ├── 02_02selfcheck-checkpoint.ipynb │ │ ├── 02_04selfcheck-checkpoint.ipynb │ │ ├── 02_05-checkpoint.ipynb │ │ ├── 02_05selfcheck-checkpoint.ipynb │ │ ├── 02_06-checkpoint.ipynb │ │ ├── 02_06selfcheck-checkpoint.ipynb │ │ ├── 02_07-checkpoint.ipynb │ │ ├── 02_07selfcheck-checkpoint.ipynb │ │ ├── 02_08selfcheck-checkpoint.ipynb │ │ └── 02_09selfcheck-checkpoint.ipynb │ ├── 02_02.ipynb │ ├── 02_02selfcheck.ipynb │ ├── 02_03.ipynb │ ├── 02_03selfcheck.ipynb │ ├── 02_04.ipynb │ ├── 02_04selfcheck.ipynb │ ├── 02_05.ipynb │ ├── 02_05selfcheck.ipynb │ ├── 02_06.ipynb │ ├── 02_06selfcheck.ipynb │ ├── 02_07.ipynb │ ├── 02_07selfcheck.ipynb │ ├── 02_08.ipynb │ ├── 02_08selfcheck.ipynb │ ├── 02_09.ipynb │ ├── 02_09selfcheck.ipynb │ └── files │ │ └── art │ │ └── check.png └── snippets_py │ ├── .ipynb_checkpoints │ ├── 02_05-checkpoint.py │ └── 02_07-checkpoint.py │ ├── 02_02.py │ ├── 02_02selfcheck.py │ ├── 02_03.py │ ├── 02_03selfcheck.py │ ├── 02_04.py │ ├── 02_04selfcheck.py │ ├── 02_05.py │ ├── 02_05selfcheck.py │ ├── 02_06.py │ ├── 02_06selfcheck.py │ ├── 02_07.py │ ├── 02_07selfcheck.py │ ├── 02_08.py │ ├── 02_08selfcheck.py │ ├── 02_09.py │ └── 02_09selfcheck.py ├── lesson03 ├── fig03_01.py ├── fig03_02.py ├── snippets_ipynb │ ├── .ipynb_checkpoints │ │ ├── 03_03selfcheck-checkpoint.ipynb │ │ ├── 03_05-checkpoint.ipynb │ │ ├── 03_05selfcheck-checkpoint.ipynb │ │ ├── 03_06-checkpoint.ipynb │ │ ├── 03_06selfcheck-checkpoint.ipynb │ │ ├── 03_07-checkpoint.ipynb │ │ ├── 03_07selfcheck-checkpoint.ipynb │ │ ├── 03_08-checkpoint.ipynb │ │ ├── 03_08selfcheck-checkpoint.ipynb │ │ ├── 03_09-checkpoint.ipynb │ │ ├── 03_09selfcheck-checkpoint.ipynb │ │ ├── 03_10selfcheck-checkpoint.ipynb │ │ ├── 03_12selfcheck-checkpoint.ipynb │ │ ├── 03_13selfcheck-checkpoint.ipynb │ │ ├── 03_14-checkpoint.ipynb │ │ ├── 03_14selfcheck-checkpoint.ipynb │ │ ├── 03_15-checkpoint.ipynb │ │ ├── 03_16-checkpoint.ipynb │ │ ├── 03_16selfcheck-checkpoint.ipynb │ │ ├── 03_17-checkpoint.ipynb │ │ ├── 03_17selfcheck-checkpoint.ipynb │ │ ├── ex03_02-checkpoint.ipynb │ │ └── ex03_04-checkpoint.ipynb │ ├── 03_03selfcheck.ipynb │ ├── 03_05.ipynb │ ├── 03_05selfcheck.ipynb │ ├── 03_06.ipynb │ ├── 03_06selfcheck.ipynb │ ├── 03_07.ipynb │ ├── 03_07selfcheck.ipynb │ ├── 03_08.ipynb │ ├── 03_08selfcheck.ipynb │ ├── 03_09.ipynb │ ├── 03_09selfcheck.ipynb │ ├── 03_10selfcheck.ipynb │ ├── 03_13.ipynb │ ├── 03_13selfcheck.ipynb │ ├── 03_14.ipynb │ ├── 03_14selfcheck.ipynb │ ├── 03_15.ipynb │ ├── 03_16.ipynb │ ├── 03_16selfcheck.ipynb │ ├── 03_17.ipynb │ ├── 03_17selfcheck.ipynb │ └── files │ │ └── art │ │ └── check.png └── snippets_py │ ├── .ipynb_checkpoints │ ├── 03_12selfcheck-checkpoint.py │ ├── 03_17selfcheck-checkpoint.py │ ├── ex03_02-checkpoint.py │ ├── ex03_03-checkpoint.py │ ├── ex03_04-checkpoint.py │ └── ex03_22-checkpoint.py │ ├── 03_03selfcheck.py │ ├── 03_05.py │ ├── 03_05selfcheck.py │ ├── 03_06.py │ ├── 03_06selfcheck.py │ ├── 03_07.py │ ├── 03_07selfcheck.py │ ├── 03_08.py │ ├── 03_08selfcheck.py │ ├── 03_09.py │ ├── 03_09selfcheck.py │ ├── 03_10selfcheck.py │ ├── 03_13.py │ ├── 03_13selfcheck.py │ ├── 03_14.py │ ├── 03_14selfcheck.py │ ├── 03_15y.py │ ├── 03_16.py │ ├── 03_16selfcheck.py │ ├── 03_17.py │ └── 03_17selfcheck.py ├── lesson04 ├── fig04_01.py ├── fig04_02.py ├── fig04_03.py ├── snippets_ipynb │ ├── .ipynb_checkpoints │ │ ├── 04_02-checkpoint.ipynb │ │ ├── 04_02selfcheck-checkpoint.ipynb │ │ ├── 04_03-checkpoint.ipynb │ │ ├── 04_03selfcheck-checkpoint.ipynb │ │ ├── 04_04-checkpoint.ipynb │ │ ├── 04_04selfcheck-checkpoint.ipynb │ │ ├── 04_05selfcheck-checkpoint.ipynb │ │ ├── 04_07-checkpoint.ipynb │ │ ├── 04_08-checkpoint.ipynb │ │ ├── 04_11selfcheck-checkpoint.ipynb │ │ ├── 04_12-checkpoint.ipynb │ │ ├── 04_13-checkpoint.ipynb │ │ ├── 04_14selfcheck-checkpoint.ipynb │ │ ├── 04_15-checkpoint.ipynb │ │ ├── 04_15selfcheck-checkpoint.ipynb │ │ ├── 04_17-checkpoint.ipynb │ │ ├── 04_18-checkpoint.ipynb │ │ ├── 04_18selfcheck-checkpoint.ipynb │ │ └── ex04_05-checkpoint.ipynb │ ├── 04_02.ipynb │ ├── 04_02selfcheck.ipynb │ ├── 04_03.ipynb │ ├── 04_03selfcheck.ipynb │ ├── 04_04.ipynb │ ├── 04_04selfcheck.ipynb │ ├── 04_05.ipynb │ ├── 04_05selfcheck.ipynb │ ├── 04_07.ipynb │ ├── 04_08.ipynb │ ├── 04_09.ipynb │ ├── 04_10.ipynb │ ├── 04_11.ipynb │ ├── 04_11selfcheck.ipynb │ ├── 04_12.ipynb │ ├── 04_13.ipynb │ ├── 04_14.ipynb │ ├── 04_14selfcheck.ipynb │ ├── 04_15.ipynb │ ├── 04_15selfcheck.ipynb │ ├── 04_17.ipynb │ ├── 04_18.ipynb │ ├── 04_18selfcheck.ipynb │ └── files │ │ └── art │ │ └── check.png └── snippets_py │ ├── .ipynb_checkpoints │ ├── 04_02-checkpoint.py │ ├── 04_03selfcheck-checkpoint.py │ ├── 04_04selfcheck-checkpoint.py │ ├── 04_13-checkpoint.py │ ├── 04_14selfcheck-checkpoint.py │ ├── 04_15selfcheck-checkpoint.py │ ├── 04_17-checkpoint.py │ ├── 04_18selfcheck-checkpoint.py │ └── ex04_05-checkpoint.py │ ├── 04_02.py │ ├── 04_02selfcheck.py │ ├── 04_03.py │ ├── 04_03selfcheck.py │ ├── 04_04.py │ ├── 04_04selfcheck.py │ ├── 04_05selfcheck.py │ ├── 04_07.py │ ├── 04_08.py │ ├── 04_09.py │ ├── 04_09selfcheck.py │ ├── 04_10.py │ ├── 04_10selfcheck.py │ ├── 04_11.py │ ├── 04_11selfcheck.py │ ├── 04_12.py │ ├── 04_12selfcheck.py │ ├── 04_13.py │ ├── 04_14.py │ ├── 04_14selfcheck.py │ ├── 04_15.py │ ├── 04_15selfcheck.py │ ├── 04_17.py │ ├── 04_18.py │ └── 04_18selfcheck.py ├── lesson05 ├── RollDie.py ├── fig05_01.py ├── snippets_ipynb │ ├── .ipynb_checkpoints │ │ ├── 05_02-checkpoint.ipynb │ │ ├── 05_02selfcheck-checkpoint.ipynb │ │ ├── 05_03-checkpoint.ipynb │ │ ├── 05_03selfcheck-checkpoint.ipynb │ │ ├── 05_04-checkpoint.ipynb │ │ ├── 05_04selfcheck-checkpoint.ipynb │ │ ├── 05_05-checkpoint.ipynb │ │ ├── 05_05selfcheck-checkpoint.ipynb │ │ ├── 05_06-checkpoint.ipynb │ │ ├── 05_06selfcheck-checkpoint.ipynb │ │ ├── 05_07-checkpoint.ipynb │ │ ├── 05_08-checkpoint.ipynb │ │ ├── 05_08selfcheck-checkpoint.ipynb │ │ ├── 05_09-checkpoint.ipynb │ │ ├── 05_09selfcheck-checkpoint.ipynb │ │ ├── 05_10-checkpoint.ipynb │ │ ├── 05_10selfcheck-checkpoint.ipynb │ │ ├── 05_11-checkpoint.ipynb │ │ ├── 05_12-checkpoint.ipynb │ │ ├── 05_12selfcheck-checkpoint.ipynb │ │ ├── 05_13-checkpoint.ipynb │ │ ├── 05_13selfcheck-checkpoint.ipynb │ │ ├── 05_14-checkpoint.ipynb │ │ ├── 05_14selfcheck-checkpoint.ipynb │ │ ├── 05_15-checkpoint.ipynb │ │ ├── 05_15selfcheck-checkpoint.ipynb │ │ ├── 05_16-checkpoint.ipynb │ │ ├── 05_16selfcheck-checkpoint.ipynb │ │ └── 05_17-checkpoint.ipynb │ ├── 05_02.ipynb │ ├── 05_02selfcheck.ipynb │ ├── 05_03.ipynb │ ├── 05_03selfcheck.ipynb │ ├── 05_04.ipynb │ ├── 05_04selfcheck.ipynb │ ├── 05_05.ipynb │ ├── 05_05selfcheck.ipynb │ ├── 05_06.ipynb │ ├── 05_06selfcheck.ipynb │ ├── 05_07.ipynb │ ├── 05_08.ipynb │ ├── 05_08selfcheck.ipynb │ ├── 05_09.ipynb │ ├── 05_09selfcheck.ipynb │ ├── 05_10.ipynb │ ├── 05_10selfcheck.ipynb │ ├── 05_11.ipynb │ ├── 05_12.ipynb │ ├── 05_12selfcheck.ipynb │ ├── 05_13.ipynb │ ├── 05_13selfcheck.ipynb │ ├── 05_14.ipynb │ ├── 05_14selfcheck.ipynb │ ├── 05_15.ipynb │ ├── 05_15selfcheck.ipynb │ ├── 05_16.ipynb │ ├── 05_16selfcheck.ipynb │ ├── 05_17.ipynb │ ├── RollDie.py │ └── files │ │ └── art │ │ └── check.png ├── snippets_py │ ├── .ipynb_checkpoints │ │ ├── 05_13selfcheck-checkpoint.py │ │ ├── 05_17-checkpoint.py │ │ └── 05_17selfcheck-checkpoint.py │ ├── 05_02.py │ ├── 05_02selfcheck.py │ ├── 05_03.py │ ├── 05_03selfcheck.py │ ├── 05_04.py │ ├── 05_04selfcheck.py │ ├── 05_05.py │ ├── 05_05selfcheck.py │ ├── 05_06.py │ ├── 05_06selfcheck.py │ ├── 05_07.py │ ├── 05_08.py │ ├── 05_08selfcheck.py │ ├── 05_09.py │ ├── 05_09selfcheck.py │ ├── 05_10.py │ ├── 05_10selfcheck.py │ ├── 05_11.py │ ├── 05_12.py │ ├── 05_12selfcheck.py │ ├── 05_13.py │ ├── 05_13selfcheck.py │ ├── 05_14.py │ ├── 05_14selfcheck.py │ ├── 05_15.py │ ├── 05_15selfcheck.py │ ├── 05_16.py │ ├── 05_16selfcheck.py │ ├── 05_17.py │ └── 05_17selfcheck.py └── temp.py ├── lesson06 ├── .ipynb_checkpoints │ └── RollDieDynamic-checkpoint.py ├── RollDieDynamic.py ├── fig06_01.py ├── fig06_02.py ├── snippets_ipynb │ ├── .ipynb_checkpoints │ │ ├── 06.02.01-checkpoint.ipynb │ │ ├── 06.02.01selfcheck-checkpoint.ipynb │ │ ├── 06.02.02-checkpoint.ipynb │ │ ├── 06.02.03-checkpoint.ipynb │ │ ├── 06.02.03selfcheck-checkpoint.ipynb │ │ ├── 06.02.04-checkpoint.ipynb │ │ ├── 06.02.04selfcheck-checkpoint.ipynb │ │ ├── 06.02.05-checkpoint.ipynb │ │ ├── 06.02.07-checkpoint.ipynb │ │ ├── 06.02.07selfcheck-checkpoint.ipynb │ │ ├── 06.02.08-checkpoint.ipynb │ │ ├── 06.02.09-checkpoint.ipynb │ │ ├── 06.02.09selfcheck-checkpoint.ipynb │ │ ├── 06.03.00-checkpoint.ipynb │ │ ├── 06.03.00selfcheck-checkpoint.ipynb │ │ ├── 06.03.01-checkpoint.ipynb │ │ ├── 06.03.01selfcheck-checkpoint.ipynb │ │ ├── 06.03.02-checkpoint.ipynb │ │ ├── 06.03.02selfcheck-checkpoint.ipynb │ │ ├── 06.03.03-checkpoint.ipynb │ │ ├── 06.03.04-checkpoint.ipynb │ │ └── ex06.04-checkpoint.ipynb │ ├── 06.02.01.ipynb │ ├── 06.02.01selfcheck.ipynb │ ├── 06.02.02.ipynb │ ├── 06.02.03.ipynb │ ├── 06.02.03selfcheck.ipynb │ ├── 06.02.04.ipynb │ ├── 06.02.04selfcheck.ipynb │ ├── 06.02.05.ipynb │ ├── 06.02.07.ipynb │ ├── 06.02.07selfcheck.ipynb │ ├── 06.02.08.ipynb │ ├── 06.02.09.ipynb │ ├── 06.02.09selfcheck.ipynb │ ├── 06.03.00.ipynb │ ├── 06.03.00selfcheck.ipynb │ ├── 06.03.01.ipynb │ ├── 06.03.01selfcheck.ipynb │ ├── 06.03.02.ipynb │ ├── 06.03.02selfcheck.ipynb │ ├── 06.03.03.ipynb │ ├── 06.03.04.ipynb │ └── files │ │ └── art │ │ └── check.png └── snippets_py │ ├── 06.02.01.py │ ├── 06.02.01selfcheck.py │ ├── 06.02.02.py │ ├── 06.02.03.py │ ├── 06.02.03selfcheck.py │ ├── 06.02.04.py │ ├── 06.02.04selfcheck.py │ ├── 06.02.05.py │ ├── 06.02.07.py │ ├── 06.02.07selfcheck.py │ ├── 06.02.08.py │ ├── 06.02.09.py │ ├── 06.02.09selfcheck.py │ ├── 06.03.00.py │ ├── 06.03.00.selfcheck.py │ ├── 06.03.01.py │ ├── 06.03.01selfcheck.py │ ├── 06.03.02.py │ ├── 06.03.02selfcheck.py │ ├── 06.03.03.py │ └── 06.03.04.py ├── lesson07 ├── snippets_ipynb │ ├── .ipynb_checkpoints │ │ ├── 07_02-checkpoint.ipynb │ │ ├── 07_02selfcheck-checkpoint.ipynb │ │ ├── 07_03-checkpoint.ipynb │ │ ├── 07_03selfcheck-checkpoint.ipynb │ │ ├── 07_04-checkpoint.ipynb │ │ ├── 07_05-checkpoint.ipynb │ │ ├── 07_05selfcheck-checkpoint.ipynb │ │ ├── 07_06-checkpoint.ipynb │ │ ├── 07_06selfcheck-checkpoint.ipynb │ │ ├── 07_07-checkpoint.ipynb │ │ ├── 07_07selfcheck-checkpoint.ipynb │ │ ├── 07_08-checkpoint.ipynb │ │ ├── 07_08selfcheck-checkpoint.ipynb │ │ ├── 07_09-checkpoint.ipynb │ │ ├── 07_09selfcheck-checkpoint.ipynb │ │ ├── 07_10-checkpoint.ipynb │ │ ├── 07_10selfcheck-checkpoint.ipynb │ │ ├── 07_11-checkpoint.ipynb │ │ ├── 07_12-checkpoint.ipynb │ │ ├── 07_13-checkpoint.ipynb │ │ ├── 07_13selfcheck-checkpoint.ipynb │ │ ├── 07_14.01-checkpoint.ipynb │ │ ├── 07_14.01selfcheck-checkpoint.ipynb │ │ ├── 07_14.02-checkpoint.ipynb │ │ └── 07_14.02selfcheck-checkpoint.ipynb │ ├── 07_02.ipynb │ ├── 07_02selfcheck.ipynb │ ├── 07_03.ipynb │ ├── 07_03selfcheck.ipynb │ ├── 07_04.ipynb │ ├── 07_05.ipynb │ ├── 07_05selfcheck.ipynb │ ├── 07_06.ipynb │ ├── 07_06selfcheck.ipynb │ ├── 07_07.ipynb │ ├── 07_07selfcheck.ipynb │ ├── 07_08.ipynb │ ├── 07_08selfcheck.ipynb │ ├── 07_09.ipynb │ ├── 07_09selfcheck.ipynb │ ├── 07_10.ipynb │ ├── 07_10selfcheck.ipynb │ ├── 07_11.ipynb │ ├── 07_12.ipynb │ ├── 07_13.ipynb │ ├── 07_13selfcheck.ipynb │ ├── 07_14.01.ipynb │ ├── 07_14.01selfcheck.ipynb │ ├── 07_14.02.ipynb │ ├── 07_14.02selfcheck.ipynb │ └── files │ │ └── art │ │ └── check.png └── snippets_py │ ├── .ipynb_checkpoints │ └── 07_08selfcheck-checkpoint.py │ ├── 07_02.py │ ├── 07_02selfcheck.py │ ├── 07_03.py │ ├── 07_03selfcheck.py │ ├── 07_04.py │ ├── 07_05.py │ ├── 07_05selfcheck.py │ ├── 07_06.py │ ├── 07_06selfcheck.py │ ├── 07_07.py │ ├── 07_07selfcheck.py │ ├── 07_08.py │ ├── 07_08selfcheck.py │ ├── 07_09.py │ ├── 07_09selfcheck.py │ ├── 07_10.py │ ├── 07_10selfcheck.py │ ├── 07_11.py │ ├── 07_12.py │ ├── 07_13.py │ ├── 07_13selfcheck.py │ ├── 07_14.01.py │ ├── 07_14.01selfcheck.py │ ├── 07_14.02.py │ └── 07_14.02selfcheck.py ├── lesson08 ├── snippets_ipynb │ ├── 08_02.01.ipynb │ ├── 08_02.01selfcheck.ipynb │ ├── 08_02.02.ipynb │ ├── 08_02.02selfcheck.ipynb │ ├── 08_02.03.ipynb │ ├── 08_02.03selfcheck.ipynb │ ├── 08_02.04.ipynb │ ├── 08_02.04selfcheck.ipynb │ ├── 08_03.ipynb │ ├── 08_03selfcheck.ipynb │ ├── 08_04.ipynb │ ├── 08_04selfcheck.ipynb │ ├── 08_05.ipynb │ ├── 08_05selfcheck.ipynb │ ├── 08_06.ipynb │ ├── 08_07.ipynb │ ├── 08_07selfcheck.ipynb │ ├── 08_08.ipynb │ ├── 08_08selfcheck.ipynb │ ├── 08_09.ipynb │ ├── 08_09selfcheck.ipynb │ ├── 08_10.ipynb │ ├── 08_11.ipynb │ ├── 08_12.01.ipynb │ ├── 08_12.01selfcheck.ipynb │ ├── 08_12.02.ipynb │ ├── 08_12.02selfcheck.ipynb │ ├── 08_12.03.ipynb │ ├── 08_12.03selfcheck.ipynb │ ├── 08_13.ipynb │ ├── 08_13selfcheck.ipynb │ └── files │ │ └── art │ │ └── check.png └── snippets_py │ ├── .ipynb_checkpoints │ └── 08_09-checkpoint.py │ ├── 08_02.01.py │ ├── 08_02.01selfcheck.py │ ├── 08_02.02.py │ ├── 08_02.02selfcheck.py │ ├── 08_02.03.py │ ├── 08_02.03selfcheck.py │ ├── 08_02.04.py │ ├── 08_02.04selfcheck.py │ ├── 08_03.py │ ├── 08_03selfcheck.py │ ├── 08_04.py │ ├── 08_04selfcheck.py │ ├── 08_05.py │ ├── 08_05selfcheck.py │ ├── 08_06.py │ ├── 08_07.py │ ├── 08_07selfcheck.py │ ├── 08_08.py │ ├── 08_08selfcheck.py │ ├── 08_09.py │ ├── 08_09selfcheck.py │ ├── 08_10.py │ ├── 08_11.py │ ├── 08_12.01.py │ ├── 08_12.01selfcheck.py │ ├── 08_12.02.py │ ├── 08_12.02selfcheck.py │ ├── 08_12.03.py │ ├── 08_12.03selfcheck.py │ ├── 08_13.py │ └── 08_13selfcheck.py ├── lesson09 ├── dividebyzero.py ├── snippets_ipynb │ ├── 09_03.01.ipynb │ ├── 09_03.01selfcheck.ipynb │ ├── 09_03.02.ipynb │ ├── 09_03.02selfcheck.ipynb │ ├── 09_04.ipynb │ ├── 09_04selfcheck.ipynb │ ├── 09_05.ipynb │ ├── 09_05selfcheck.ipynb │ ├── 09_08.01.ipynb │ ├── 09_08.02.ipynb │ ├── 09_08.02selfcheck.ipynb │ ├── 09_09.ipynb │ ├── 09_09selfcheck.ipynb │ ├── 09_11.ipynb │ ├── 09_12.01.ipynb │ ├── 09_12.01selfcheck.ipynb │ ├── 09_12.02.ipynb │ ├── 09_12.03-05.ipynb │ ├── files │ │ └── art │ │ │ └── check.png │ ├── grades.csv │ └── grades.txt └── snippets_py │ ├── .ipynb_checkpoints │ ├── 09_03.01selfcheck-checkpoint.py │ └── 09_12.03-05-checkpoint.py │ ├── 09_03.01.py │ ├── 09_03.01selfcheck.py │ ├── 09_03.02.py │ ├── 09_03.02selfcheck.py │ ├── 09_04.py │ ├── 09_04selfcheck.py │ ├── 09_05.py │ ├── 09_05selfcheck.py │ ├── 09_08.02selfcheck.py │ ├── 09_09.py │ ├── 09_09selfcheck.py │ ├── 09_11.py │ ├── 09_12.01.py │ ├── 09_12.01selfcheck.py │ ├── 09_12.02.py │ └── 09_12.03-05.py ├── lesson10 ├── account.py ├── accountdoctest.py ├── ave_hi_austin_jan_1895-2018.csv ├── ave_hi_la_jan_1895-2018.csv ├── ave_hi_nyc2_jan_1895-2018.csv ├── ave_hi_nyc_jan_1895-2018.csv ├── card.py ├── card_images │ ├── 10_of_clubs.png │ ├── 10_of_clubs.svg │ ├── 10_of_diamonds.png │ ├── 10_of_diamonds.svg │ ├── 10_of_hearts.png │ ├── 10_of_hearts.svg │ ├── 10_of_spades.png │ ├── 10_of_spades.svg │ ├── 2_of_clubs.png │ ├── 2_of_clubs.svg │ ├── 2_of_diamonds.png │ ├── 2_of_diamonds.svg │ ├── 2_of_hearts.png │ ├── 2_of_hearts.svg │ ├── 2_of_spades.png │ ├── 2_of_spades.svg │ ├── 3_of_clubs.png │ ├── 3_of_clubs.svg │ ├── 3_of_diamonds.png │ ├── 3_of_diamonds.svg │ ├── 3_of_hearts.png │ ├── 3_of_hearts.svg │ ├── 3_of_spades.png │ ├── 3_of_spades.svg │ ├── 4_of_clubs.png │ ├── 4_of_clubs.svg │ ├── 4_of_diamonds.png │ ├── 4_of_diamonds.svg │ ├── 4_of_hearts.png │ ├── 4_of_hearts.svg │ ├── 4_of_spades.png │ ├── 4_of_spades.svg │ ├── 5_of_clubs.png │ ├── 5_of_clubs.svg │ ├── 5_of_diamonds.png │ ├── 5_of_diamonds.svg │ ├── 5_of_hearts.png │ ├── 5_of_hearts.svg │ ├── 5_of_spades.png │ ├── 5_of_spades.svg │ ├── 6_of_clubs.png │ ├── 6_of_clubs.svg │ ├── 6_of_diamonds.png │ ├── 6_of_diamonds.svg │ ├── 6_of_hearts.png │ ├── 6_of_hearts.svg │ ├── 6_of_spades.png │ ├── 6_of_spades.svg │ ├── 7_of_clubs.png │ ├── 7_of_clubs.svg │ ├── 7_of_diamonds.png │ ├── 7_of_diamonds.svg │ ├── 7_of_hearts.png │ ├── 7_of_hearts.svg │ ├── 7_of_spades.png │ ├── 7_of_spades.svg │ ├── 8_of_clubs.png │ ├── 8_of_clubs.svg │ ├── 8_of_diamonds.png │ ├── 8_of_diamonds.svg │ ├── 8_of_hearts.png │ ├── 8_of_hearts.svg │ ├── 8_of_spades.png │ ├── 8_of_spades.svg │ ├── 9_of_clubs.png │ ├── 9_of_clubs.svg │ ├── 9_of_diamonds.png │ ├── 9_of_diamonds.svg │ ├── 9_of_hearts.png │ ├── 9_of_hearts.svg │ ├── 9_of_spades.png │ ├── 9_of_spades.svg │ ├── ace_of_clubs.png │ ├── ace_of_clubs.svg │ ├── ace_of_diamonds.png │ ├── ace_of_diamonds.svg │ ├── ace_of_hearts.png │ ├── ace_of_hearts.svg │ ├── ace_of_spades.png │ ├── ace_of_spades.svg │ ├── jack_of_clubs.png │ ├── jack_of_clubs.svg │ ├── jack_of_diamonds.png │ ├── jack_of_diamonds.svg │ ├── jack_of_hearts.png │ ├── jack_of_hearts.svg │ ├── jack_of_spades.png │ ├── jack_of_spades.svg │ ├── king_of_clubs.png │ ├── king_of_clubs.svg │ ├── king_of_diamonds.png │ ├── king_of_diamonds.svg │ ├── king_of_hearts.png │ ├── king_of_hearts.svg │ ├── king_of_spades.png │ ├── king_of_spades.svg │ ├── queen_of_clubs.png │ ├── queen_of_clubs.svg │ ├── queen_of_diamonds.png │ ├── queen_of_diamonds.svg │ ├── queen_of_hearts.png │ ├── queen_of_hearts.svg │ ├── queen_of_spades.png │ └── queen_of_spades.svg ├── carddataclass.py ├── commissionemployee.py ├── complexnumber.py ├── complexnumber2.py ├── deck.py ├── deck2.py ├── private.py ├── salariedcommissionemployee.py ├── salariedemployee.py ├── snippets_ipynb │ ├── .ipynb_checkpoints │ │ ├── 09_03.01-checkpoint.ipynb │ │ ├── 09_03.01selfcheck-checkpoint.ipynb │ │ ├── 09_03.02-checkpoint.ipynb │ │ ├── 09_03.02selfcheck-checkpoint.ipynb │ │ ├── 09_04-checkpoint.ipynb │ │ ├── 09_04selfcheck-checkpoint.ipynb │ │ ├── 09_05-checkpoint.ipynb │ │ ├── 09_05selfcheck-checkpoint.ipynb │ │ ├── 09_07selfcheck-checkpoint.ipynb │ │ ├── 09_08.01-checkpoint.ipynb │ │ ├── 09_08.02-checkpoint.ipynb │ │ ├── 09_08.02selfcheck-checkpoint.ipynb │ │ ├── 09_09-checkpoint.ipynb │ │ ├── 09_09selfcheck-checkpoint.ipynb │ │ ├── 09_10selfcheck-checkpoint.ipynb │ │ ├── 09_11-checkpoint.ipynb │ │ ├── 09_11selfcheck-checkpoint.ipynb │ │ ├── 09_12.01-checkpoint.ipynb │ │ ├── 09_12.01selfcheck-checkpoint.ipynb │ │ ├── 09_12.02-checkpoint.ipynb │ │ ├── 09_12.03-checkpoint.ipynb │ │ ├── 09_12.04-checkpoint.ipynb │ │ ├── 09_12.05-checkpoint.ipynb │ │ ├── 09_12.05selfcheck-checkpoint.ipynb │ │ ├── 10_02.01-checkpoint.ipynb │ │ ├── 10_02.01selfcheck-checkpoint.ipynb │ │ ├── 10_02.02-checkpoint.ipynb │ │ ├── 10_02.03selfcheck-checkpoint.ipynb │ │ ├── 10_03-checkpoint.ipynb │ │ ├── 10_03selfcheck-checkpoint.ipynb │ │ ├── 10_04.01-checkpoint.ipynb │ │ ├── 10_04.01selfcheck-checkpoint.ipynb │ │ ├── 10_04.02-checkpoint.ipynb │ │ ├── 10_04.02selfcheck-checkpoint.ipynb │ │ ├── 10_04.03-checkpoint.ipynb │ │ ├── 10_04.03selfcheck-checkpoint.ipynb │ │ ├── 10_05-checkpoint.ipynb │ │ ├── 10_06.01-checkpoint.ipynb │ │ ├── 10_06.02-checkpoint.ipynb │ │ ├── 10_06.03-checkpoint.ipynb │ │ ├── 10_06.04-checkpoint.ipynb │ │ ├── 10_07selfcheck-checkpoint.ipynb │ │ ├── 10_08-checkpoint.ipynb │ │ ├── 10_09-checkpoint.ipynb │ │ ├── 10_10.01-checkpoint.ipynb │ │ ├── 10_10.02-checkpoint.ipynb │ │ ├── 10_10.02selfcheck-checkpoint.ipynb │ │ ├── 10_11selfcheck-checkpoint.ipynb │ │ ├── 10_12-checkpoint.ipynb │ │ ├── 10_12selfcheck-checkpoint.ipynb │ │ ├── 10_13.01-checkpoint.ipynb │ │ ├── 10_13.01selfcheck-checkpoint.ipynb │ │ ├── 10_13.02-checkpoint.ipynb │ │ ├── 10_13.02selfcheck-checkpoint.ipynb │ │ ├── 10_13selfcheck-checkpoint.ipynb │ │ ├── 10_14-checkpoint.ipynb │ │ ├── 10_14selfcheck-checkpoint.ipynb │ │ ├── 10_15-checkpoint.ipynb │ │ ├── 10_15selfcheck-checkpoint.ipynb │ │ ├── 10_16-checkpoint.ipynb │ │ ├── account-checkpoint.py │ │ ├── carddataclass-checkpoint.py │ │ ├── private-checkpoint.py │ │ └── salariedcommissionemployee-checkpoint.py │ ├── 10_02.01.ipynb │ ├── 10_02.02.ipynb │ ├── 10_02.03selfcheck.ipynb │ ├── 10_03.ipynb │ ├── 10_04.01.ipynb │ ├── 10_04.02.ipynb │ ├── 10_04.02selfcheck.ipynb │ ├── 10_04.03.ipynb │ ├── 10_05.ipynb │ ├── 10_06.01.ipynb │ ├── 10_06.02.ipynb │ ├── 10_06.03.ipynb │ ├── 10_06.04.ipynb │ ├── 10_08.ipynb │ ├── 10_09.ipynb │ ├── 10_10.01.ipynb │ ├── 10_10.02.ipynb │ ├── 10_10.02selfcheck.ipynb │ ├── 10_12.ipynb │ ├── 10_12selfcheck.ipynb │ ├── 10_13.01.ipynb │ ├── 10_13.02.ipynb │ ├── 10_13.02selfcheck.ipynb │ ├── 10_13selfcheck.ipynb │ ├── 10_14.ipynb │ ├── 10_14selfcheck.ipynb │ ├── 10_15.ipynb │ ├── 10_16.ipynb │ ├── __pycache__ │ │ ├── account.cpython-37.pyc │ │ ├── card.cpython-37.pyc │ │ ├── carddataclass.cpython-37.pyc │ │ ├── commissionemployee.cpython-37.pyc │ │ ├── complexnumber.cpython-37.pyc │ │ ├── complexnumber2.cpython-37.pyc │ │ ├── deck.cpython-37.pyc │ │ ├── deck2.cpython-37.pyc │ │ ├── private.cpython-37.pyc │ │ ├── salariedcommissionemployee.cpython-37.pyc │ │ └── timewithproperties.cpython-37.pyc │ ├── account.py │ ├── accountdoctest.py │ ├── accountdoctest2.py │ ├── ave_hi_la_jan_1895-2018.csv │ ├── ave_hi_nyc_jan_1895-2018.csv │ ├── card.py │ ├── card_images │ │ ├── 10_of_clubs.png │ │ ├── 10_of_clubs.svg │ │ ├── 10_of_diamonds.png │ │ ├── 10_of_diamonds.svg │ │ ├── 10_of_hearts.png │ │ ├── 10_of_hearts.svg │ │ ├── 10_of_spades.png │ │ ├── 10_of_spades.svg │ │ ├── 2_of_clubs.png │ │ ├── 2_of_clubs.svg │ │ ├── 2_of_diamonds.png │ │ ├── 2_of_diamonds.svg │ │ ├── 2_of_hearts.png │ │ ├── 2_of_hearts.svg │ │ ├── 2_of_spades.png │ │ ├── 2_of_spades.svg │ │ ├── 3_of_clubs.png │ │ ├── 3_of_clubs.svg │ │ ├── 3_of_diamonds.png │ │ ├── 3_of_diamonds.svg │ │ ├── 3_of_hearts.png │ │ ├── 3_of_hearts.svg │ │ ├── 3_of_spades.png │ │ ├── 3_of_spades.svg │ │ ├── 4_of_clubs.png │ │ ├── 4_of_clubs.svg │ │ ├── 4_of_diamonds.png │ │ ├── 4_of_diamonds.svg │ │ ├── 4_of_hearts.png │ │ ├── 4_of_hearts.svg │ │ ├── 4_of_spades.png │ │ ├── 4_of_spades.svg │ │ ├── 5_of_clubs.png │ │ ├── 5_of_clubs.svg │ │ ├── 5_of_diamonds.png │ │ ├── 5_of_diamonds.svg │ │ ├── 5_of_hearts.png │ │ ├── 5_of_hearts.svg │ │ ├── 5_of_spades.png │ │ ├── 5_of_spades.svg │ │ ├── 6_of_clubs.png │ │ ├── 6_of_clubs.svg │ │ ├── 6_of_diamonds.png │ │ ├── 6_of_diamonds.svg │ │ ├── 6_of_hearts.png │ │ ├── 6_of_hearts.svg │ │ ├── 6_of_spades.png │ │ ├── 6_of_spades.svg │ │ ├── 7_of_clubs.png │ │ ├── 7_of_clubs.svg │ │ ├── 7_of_diamonds.png │ │ ├── 7_of_diamonds.svg │ │ ├── 7_of_hearts.png │ │ ├── 7_of_hearts.svg │ │ ├── 7_of_spades.png │ │ ├── 7_of_spades.svg │ │ ├── 8_of_clubs.png │ │ ├── 8_of_clubs.svg │ │ ├── 8_of_diamonds.png │ │ ├── 8_of_diamonds.svg │ │ ├── 8_of_hearts.png │ │ ├── 8_of_hearts.svg │ │ ├── 8_of_spades.png │ │ ├── 8_of_spades.svg │ │ ├── 9_of_clubs.png │ │ ├── 9_of_clubs.svg │ │ ├── 9_of_diamonds.png │ │ ├── 9_of_diamonds.svg │ │ ├── 9_of_hearts.png │ │ ├── 9_of_hearts.svg │ │ ├── 9_of_spades.png │ │ ├── 9_of_spades.svg │ │ ├── ace_of_clubs.png │ │ ├── ace_of_clubs.svg │ │ ├── ace_of_diamonds.png │ │ ├── ace_of_diamonds.svg │ │ ├── ace_of_hearts.png │ │ ├── ace_of_hearts.svg │ │ ├── ace_of_spades.png │ │ ├── ace_of_spades.svg │ │ ├── jack_of_clubs.png │ │ ├── jack_of_clubs.svg │ │ ├── jack_of_diamonds.png │ │ ├── jack_of_diamonds.svg │ │ ├── jack_of_hearts.png │ │ ├── jack_of_hearts.svg │ │ ├── jack_of_spades.png │ │ ├── jack_of_spades.svg │ │ ├── king_of_clubs.png │ │ ├── king_of_clubs.svg │ │ ├── king_of_diamonds.png │ │ ├── king_of_diamonds.svg │ │ ├── king_of_hearts.png │ │ ├── king_of_hearts.svg │ │ ├── king_of_spades.png │ │ ├── king_of_spades.svg │ │ ├── queen_of_clubs.png │ │ ├── queen_of_clubs.svg │ │ ├── queen_of_diamonds.png │ │ ├── queen_of_diamonds.svg │ │ ├── queen_of_hearts.png │ │ ├── queen_of_hearts.svg │ │ ├── queen_of_spades.png │ │ └── queen_of_spades.svg │ ├── carddataclass.py │ ├── commissionemployee.py │ ├── complexnumber.py │ ├── complexnumber2.py │ ├── deck.py │ ├── deck2.py │ ├── files │ │ └── art │ │ │ └── check.png │ ├── private.py │ ├── salariedcommissionemployee.py │ └── timewithproperties.py ├── snippets_py │ ├── .ipynb_checkpoints │ │ ├── 10_02.01-checkpoint.py │ │ ├── 10_04.03-checkpoint.py │ │ ├── 10_09-checkpoint.py │ │ ├── 10_12-checkpoint.py │ │ ├── 10_13.01-checkpoint.py │ │ ├── 10_13.02-checkpoint.py │ │ ├── 10_13.02selfcheck-checkpoint.py │ │ ├── 10_15-checkpoint.py │ │ ├── 10_16-checkpoint.py │ │ ├── account-checkpoint.py │ │ ├── carddataclass-checkpoint.py │ │ └── private-checkpoint.py │ ├── 10_02.01.py │ ├── 10_02.03selfcheck.py │ ├── 10_03.py │ ├── 10_04.01.py │ ├── 10_04.02selfcheck.py │ ├── 10_04.03.py │ ├── 10_05.py │ ├── 10_06.01.py │ ├── 10_06.04.py │ ├── 10_06.04selfcheck.py │ ├── 10_08.py │ ├── 10_09.py │ ├── 10_10.01.py │ ├── 10_10.02selfcheck.py │ ├── 10_12.py │ ├── 10_12selfcheck.py │ ├── 10_13.01.py │ ├── 10_13.02.py │ ├── 10_13.02selfcheck.py │ ├── 10_15.py │ ├── 10_16.py │ ├── __pycache__ │ │ ├── account.cpython-37.pyc │ │ └── timewithproperties.cpython-37.pyc │ ├── account.py │ ├── accountdoctest.py │ ├── accountdoctest2.py │ ├── ave_hi_la_jan_1895-2018.csv │ ├── ave_hi_nyc_jan_1895-2018.csv │ ├── card.py │ ├── carddataclass.py │ ├── commissionemployee.py │ ├── complexnumber.py │ ├── complexnumber2.py │ ├── deck.py │ ├── deck2.py │ ├── private.py │ ├── salariedcommissionemployee.py │ └── timewithproperties.py └── timewithproperties.py ├── lesson11 ├── mask_circle.png ├── mask_heart.png ├── mask_oval.png ├── mask_star.png ├── snippets_ipynb │ ├── 11_02.01-07.ipynb │ ├── 11_02.08.ipynb │ ├── 11_02.09.ipynb │ ├── 11_02.10.ipynb │ ├── 11_02.11.ipynb │ ├── 11_02.12.ipynb │ ├── 11_02.13.ipynb │ ├── 11_02.14.ipynb │ ├── 11_03.01.ipynb │ ├── 11_03.02.ipynb │ ├── 11_04.ipynb │ ├── 11_05.ipynb │ ├── 11_06.ipynb │ ├── RomeoAndJulietHeart.png │ ├── RomeoAndJulietStar.png │ ├── files │ │ └── art │ │ │ ├── .ipynb_checkpoints │ │ │ └── check-checkpoint.png │ │ │ └── check.png │ ├── mask_circle.png │ ├── mask_heart.png │ ├── mask_oval.png │ └── mask_star.png └── snippets_py │ ├── 11_02.01-07.py │ ├── 11_02.08.py │ ├── 11_02.09.py │ ├── 11_02.10.py │ ├── 11_02.11.py │ ├── 11_02.12.py │ ├── 11_02.13.py │ ├── 11_02.14.py │ ├── 11_03.01.py │ ├── 11_03.02.py │ ├── 11_04.py │ ├── 11_05.py │ └── 11_06.py ├── lesson12 ├── _READ_ME_FIRST ├── keys.py ├── locationlistener.py ├── sentimentlistener.py ├── snippets_ipynb │ ├── 12_07-11.ipynb │ ├── 12_12.ipynb │ ├── 12_13_02.ipynb │ ├── 12_14.ipynb │ ├── 12_15.ipynb │ ├── README.txt │ ├── files │ │ └── art │ │ │ ├── .ipynb_checkpoints │ │ │ └── check-checkpoint.png │ │ │ └── check.png │ ├── keys.py │ ├── locationlistener.py │ ├── sentimentlistener.py │ ├── tweetlistener.py │ └── tweetutilities.py ├── snippets_py │ ├── 12_07-11.py │ ├── 12_12.py │ ├── 12_13_02.py │ ├── 12_15_01.py │ ├── keys.py │ ├── locationlistener.py │ ├── sentimentlistener.py │ ├── tweet_map.html │ ├── tweetlistener.py │ └── tweetutilities.py ├── tweetlistener.py └── tweetutilities.py ├── lesson13 ├── SimpleLanguageTranslator.ipynb ├── SimpleLanguageTranslator.py ├── SpokenResponse.wav └── keys.py ├── lesson14 ├── ave_hi_nyc_jan_1895-2018.csv ├── ave_yearly_temp_nyc_1895-2017.csv ├── images │ ├── .ipynb_checkpoints │ │ ├── IntroToPythonCover-checkpoint.png │ │ ├── PyFPCover-checkpoint.png │ │ ├── PythonFundamentalsLiveLessons-checkpoint.jpg │ │ └── course_image-checkpoint.jpg │ ├── IntroToPythonCover.png │ ├── IntroToPythonTOC.png │ ├── PyFPCover.png │ ├── PythonFundamentalsLiveLessons.jpg │ └── course_image.jpg ├── snippets_ipynb │ ├── .ipynb_checkpoints │ │ ├── 14_02-03-checkpoint.ipynb │ │ ├── 14_04-checkpoint.ipynb │ │ ├── 14_05-checkpoint.ipynb │ │ ├── 14_06-checkpoint.ipynb │ │ ├── 14_07-checkpoint.ipynb │ │ ├── 16_02-03-checkpoint.ipynb │ │ ├── 16_04-checkpoint.ipynb │ │ ├── 16_05-checkpoint.ipynb │ │ ├── 16_06-checkpoint.ipynb │ │ └── 16_07-checkpoint.ipynb │ ├── 14_02-03.ipynb │ ├── 14_04.ipynb │ ├── 14_05.ipynb │ ├── 14_06.ipynb │ ├── 14_07.ipynb │ ├── ave_hi_nyc_jan_1895-2018.csv │ ├── ave_yearly_temp_nyc_1895-2017.csv │ ├── files │ │ └── art │ │ │ └── check.png │ └── notebook.tex └── snippets_py │ ├── .ipynb_checkpoints │ ├── 14_02-03-checkpoint.py │ ├── 14_04-checkpoint.py │ ├── 14_05-checkpoint.py │ ├── 14_06-checkpoint.py │ ├── 14_07-checkpoint.py │ ├── 16_02-03-checkpoint.py │ ├── 16_04-checkpoint.py │ ├── 16_07-checkpoint.py │ └── digits3d-checkpoint.py │ ├── 14_02-03.py │ ├── 14_04.py │ ├── 14_05.py │ ├── 14_06.py │ ├── 14_07.py │ ├── ave_hi_nyc_jan_1895-2018.csv │ ├── ave_yearly_temp_nyc_1895-2017.csv │ └── digits3d.py ├── lesson15 ├── IMDB_RNN.ipynb ├── MNIST_CNN.ipynb ├── MNIST_CNN_TensorBoard.ipynb └── images │ ├── .ipynb_checkpoints │ ├── IntroToPythonCover-checkpoint.png │ ├── PyFPCover-checkpoint.png │ ├── PythonFundamentalsLiveLessons-checkpoint.jpg │ └── course_image-checkpoint.jpg │ ├── IntroToPythonCover.png │ ├── IntroToPythonTOC.png │ ├── PyFPCover.png │ ├── PythonFundamentalsLiveLessons.jpg │ └── course_image.jpg └── lesson16 ├── HadoopMapReduce ├── length_mapper.py ├── length_reducer.py └── yarn.txt ├── README.txt ├── SparkHashtagSummarizer ├── hashtagsummarizer.ipynb ├── keys.py └── starttweetstream.py ├── SparkWordCount └── RomeoAndJulietCounter.ipynb ├── SparkWordCountAzureVersion └── RomeoAndJulietCounter.ipynb ├── TwitterMongoDB ├── 16_05.ipynb ├── 16_05.py ├── files │ └── art │ │ └── check.png ├── keys.py ├── senators.csv ├── state_codes.py ├── tweetlistener.py └── us-states.json ├── iot └── simulator.py ├── pubnub ├── stocklistener.py └── subscriber_callback.py └── sql ├── 16_02.ipynb ├── 16_02.py ├── books.db └── books.sql /examples/lesson01/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson01/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson02/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson02/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/.ipynb_checkpoints/02_07-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 2.7 snippets 2 | 3 | 7 > 4 4 | 5 | 7 < 4 6 | 7 | 7 > = 4 8 | 9 | # Chaining Comparisons 10 | x = 3 11 | 12 | 1 <= x <= 5 13 | 14 | x = 10 15 | 16 | 1 <= x <= 5 17 | 18 | ########################################################################## 19 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 20 | # Pearson Education, Inc. All Rights Reserved. # 21 | # # 22 | # DISCLAIMER: The authors and publisher of this book have used their # 23 | # best efforts in preparing the book. These efforts include the # 24 | # development, research, and testing of the theories and programs # 25 | # to determine their effectiveness. The authors and publisher make # 26 | # no warranty of any kind, expressed or implied, with regard to these # 27 | # programs or to the documentation contained in these books. The authors # 28 | # and publisher shall not be liable in any event for incidental or # 29 | # consequential damages in connection with, or arising out of, the # 30 | # furnishing, performance, or use of these programs. # 31 | ########################################################################## 32 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_02.py: -------------------------------------------------------------------------------- 1 | # Section 2.2 snippets 2 | 45 + 72 3 | x = 7 4 | y = 3 5 | x + y 6 | total = x + y 7 | total 8 | type(x) 9 | type(10.5) 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_02selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 2.2 Self Check snippets 2 | total = 10.7 + 12.2 + 0.2 3 | total 4 | 5 | ########################################################################## 6 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 7 | # Pearson Education, Inc. All Rights Reserved. # 8 | # # 9 | # DISCLAIMER: The authors and publisher of this book have used their # 10 | # best efforts in preparing the book. These efforts include the # 11 | # development, research, and testing of the theories and programs # 12 | # to determine their effectiveness. The authors and publisher make # 13 | # no warranty of any kind, expressed or implied, with regard to these # 14 | # programs or to the documentation contained in these books. The authors # 15 | # and publisher shall not be liable in any event for incidental or # 16 | # consequential damages in connection with, or arising out of, the # 17 | # furnishing, performance, or use of these programs. # 18 | ########################################################################## 19 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 2.3 Self Check snippets 2 | 3 * (4 - 5) 3 | 3 * 4 - 5 4 | 4 ** 3 ** 2 5 | (4 ** 3) ** 2 6 | 4 ** (3 ** 2) 7 | 8 | ########################################################################## 9 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 10 | # Pearson Education, Inc. All Rights Reserved. # 11 | # # 12 | # DISCLAIMER: The authors and publisher of this book have used their # 13 | # best efforts in preparing the book. These efforts include the # 14 | # development, research, and testing of the theories and programs # 15 | # to determine their effectiveness. The authors and publisher make # 16 | # no warranty of any kind, expressed or implied, with regard to these # 17 | # programs or to the documentation contained in these books. The authors # 18 | # and publisher shall not be liable in any event for incidental or # 19 | # consequential damages in connection with, or arising out of, the # 20 | # furnishing, performance, or use of these programs. # 21 | ########################################################################## 22 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_04selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 2.4 Self Check snippets 2 | type('word') 3 | print('int(5.2)', 'truncates 5.2 to', int(5.2)) 4 | 5 | ########################################################################## 6 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 7 | # Pearson Education, Inc. All Rights Reserved. # 8 | # # 9 | # DISCLAIMER: The authors and publisher of this book have used their # 10 | # best efforts in preparing the book. These efforts include the # 11 | # development, research, and testing of the theories and programs # 12 | # to determine their effectiveness. The authors and publisher make # 13 | # no warranty of any kind, expressed or implied, with regard to these # 14 | # programs or to the documentation contained in these books. The authors # 15 | # and publisher shall not be liable in any event for incidental or # 16 | # consequential damages in connection with, or arising out of, the # 17 | # furnishing, performance, or use of these programs. # 18 | ########################################################################## 19 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_05selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 2.5 Self Check snippets 2 | print("""This is a lengthy 3 | multiline string containing 4 | a few lines \ 5 | of text""") 6 | 7 | ########################################################################## 8 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 9 | # Pearson Education, Inc. All Rights Reserved. # 10 | # # 11 | # DISCLAIMER: The authors and publisher of this book have used their # 12 | # best efforts in preparing the book. These efforts include the # 13 | # development, research, and testing of the theories and programs # 14 | # to determine their effectiveness. The authors and publisher make # 15 | # no warranty of any kind, expressed or implied, with regard to these # 16 | # programs or to the documentation contained in these books. The authors # 17 | # and publisher shall not be liable in any event for incidental or # 18 | # consequential damages in connection with, or arising out of, the # 19 | # furnishing, performance, or use of these programs. # 20 | ########################################################################## 21 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_06selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 2.6 Self Check snippets 2 | float('6.2') * 3.3 3 | 4 | ########################################################################## 5 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 6 | # Pearson Education, Inc. All Rights Reserved. # 7 | # # 8 | # DISCLAIMER: The authors and publisher of this book have used their # 9 | # best efforts in preparing the book. These efforts include the # 10 | # development, research, and testing of the theories and programs # 11 | # to determine their effectiveness. The authors and publisher make # 12 | # no warranty of any kind, expressed or implied, with regard to these # 13 | # programs or to the documentation contained in these books. The authors # 14 | # and publisher shall not be liable in any event for incidental or # 15 | # consequential damages in connection with, or arising out of, the # 16 | # furnishing, performance, or use of these programs. # 17 | ########################################################################## 18 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_07.py: -------------------------------------------------------------------------------- 1 | # Section 2.7 snippets 2 | 3 | 7 > 4 4 | 5 | 7 < 4 6 | 7 | 7 > = 4 8 | 9 | # Chaining Comparisons 10 | x = 3 11 | 12 | 1 <= x <= 5 13 | 14 | x = 10 15 | 16 | 1 <= x <= 5 17 | 18 | ########################################################################## 19 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 20 | # Pearson Education, Inc. All Rights Reserved. # 21 | # # 22 | # DISCLAIMER: The authors and publisher of this book have used their # 23 | # best efforts in preparing the book. These efforts include the # 24 | # development, research, and testing of the theories and programs # 25 | # to determine their effectiveness. The authors and publisher make # 26 | # no warranty of any kind, expressed or implied, with regard to these # 27 | # programs or to the documentation contained in these books. The authors # 28 | # and publisher shall not be liable in any event for incidental or # 29 | # consequential damages in connection with, or arising out of, the # 30 | # furnishing, performance, or use of these programs. # 31 | ########################################################################## 32 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_07selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 2.7 Self Check snippets 2 | 7 =< 10 3 | print(5 < 9, 5 <= 9, 5 > 9, 5 >= 9, 5 == 9, 5 != 9) 4 | 5 | ########################################################################## 6 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 7 | # Pearson Education, Inc. All Rights Reserved. # 8 | # # 9 | # DISCLAIMER: The authors and publisher of this book have used their # 10 | # best efforts in preparing the book. These efforts include the # 11 | # development, research, and testing of the theories and programs # 12 | # to determine their effectiveness. The authors and publisher make # 13 | # no warranty of any kind, expressed or implied, with regard to these # 14 | # programs or to the documentation contained in these books. The authors # 15 | # and publisher shall not be liable in any event for incidental or # 16 | # consequential damages in connection with, or arising out of, the # 17 | # furnishing, performance, or use of these programs. # 18 | ########################################################################## 19 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_08selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 2.8 Self Check snippets 2 | type(7.5 * 3) 3 | 4 | ########################################################################## 5 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 6 | # Pearson Education, Inc. All Rights Reserved. # 7 | # # 8 | # DISCLAIMER: The authors and publisher of this book have used their # 9 | # best efforts in preparing the book. These efforts include the # 10 | # development, research, and testing of the theories and programs # 11 | # to determine their effectiveness. The authors and publisher make # 12 | # no warranty of any kind, expressed or implied, with regard to these # 13 | # programs or to the documentation contained in these books. The authors # 14 | # and publisher shall not be liable in any event for incidental or # 15 | # consequential damages in connection with, or arising out of, the # 16 | # furnishing, performance, or use of these programs. # 17 | ########################################################################## 18 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_09.py: -------------------------------------------------------------------------------- 1 | # Section 2.9 snippets 2 | min(36, 27, 12) 3 | max(36, 27, 12) 4 | 5 | ########################################################################## 6 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 7 | # Pearson Education, Inc. All Rights Reserved. # 8 | # # 9 | # DISCLAIMER: The authors and publisher of this book have used their # 10 | # best efforts in preparing the book. These efforts include the # 11 | # development, research, and testing of the theories and programs # 12 | # to determine their effectiveness. The authors and publisher make # 13 | # no warranty of any kind, expressed or implied, with regard to these # 14 | # programs or to the documentation contained in these books. The authors # 15 | # and publisher shall not be liable in any event for incidental or # 16 | # consequential damages in connection with, or arising out of, the # 17 | # furnishing, performance, or use of these programs. # 18 | ########################################################################## 19 | -------------------------------------------------------------------------------- /examples/lesson02/snippets_py/02_09selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 2.9 Self Checksnippets 2 | min(47, 95, 88, 73, 88, 84) 3 | max(47, 95, 88, 73, 88, 84) 4 | print('Range:', min(47, 95, 88, 73, 88, 84), '-', 5 | max(47, 95, 88, 73, 88, 84)) 6 | 7 | 8 | ########################################################################## 9 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 10 | # Pearson Education, Inc. All Rights Reserved. # 11 | # # 12 | # DISCLAIMER: The authors and publisher of this book have used their # 13 | # best efforts in preparing the book. These efforts include the # 14 | # development, research, and testing of the theories and programs # 15 | # to determine their effectiveness. The authors and publisher make # 16 | # no warranty of any kind, expressed or implied, with regard to these # 17 | # programs or to the documentation contained in these books. The authors # 18 | # and publisher shall not be liable in any event for incidental or # 19 | # consequential damages in connection with, or arising out of, the # 20 | # furnishing, performance, or use of these programs. # 21 | ########################################################################## 22 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson03/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/.ipynb_checkpoints/03_17selfcheck-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 3.17 Self Check snippets 2 | 3 | # Exercise 4 4 | import statistics 5 | values = [47, 95, 88, 73, 88, 84] 6 | 7 | statistics.mean(values) 8 | 9 | statistics.median(values) 10 | 11 | statistics.mode(values) 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/.ipynb_checkpoints/ex03_02-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Exercise 3.2 2 | a = b = 7 3 | print('a =', a, '\\nb =', b) 4 | 5 | 6 | ########################################################################## 7 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 8 | # Pearson Education, Inc. All Rights Reserved. # 9 | # # 10 | # DISCLAIMER: The authors and publisher of this book have used their # 11 | # best efforts in preparing the book. These efforts include the # 12 | # development, research, and testing of the theories and programs # 13 | # to determine their effectiveness. The authors and publisher make # 14 | # no warranty of any kind, expressed or implied, with regard to these # 15 | # programs or to the documentation contained in these books. The authors # 16 | # and publisher shall not be liable in any event for incidental or # 17 | # consequential damages in connection with, or arising out of, the # 18 | # furnishing, performance, or use of these programs. # 19 | ########################################################################## 20 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/.ipynb_checkpoints/ex03_03-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Exercise 3.3 2 | for row in range(10): 3 | for column in range(10): 4 | print('<' if row % 2 == 1 else '>', end='') 5 | print() 6 | 7 | ########################################################################## 8 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 9 | # Pearson Education, Inc. All Rights Reserved. # 10 | # # 11 | # DISCLAIMER: The authors and publisher of this book have used their # 12 | # best efforts in preparing the book. These efforts include the # 13 | # development, research, and testing of the theories and programs # 14 | # to determine their effectiveness. The authors and publisher make # 15 | # no warranty of any kind, expressed or implied, with regard to these # 16 | # programs or to the documentation contained in these books. The authors # 17 | # and publisher shall not be liable in any event for incidental or # 18 | # consequential damages in connection with, or arising out of, the # 19 | # furnishing, performance, or use of these programs. # 20 | ########################################################################## 21 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/.ipynb_checkpoints/ex03_04-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Exercise 3.4 2 | for ***: 3 | for ***: 4 | print('@') 5 | print() 6 | 7 | ########################################################################## 8 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 9 | # Pearson Education, Inc. All Rights Reserved. # 10 | # # 11 | # DISCLAIMER: The authors and publisher of this book have used their # 12 | # best efforts in preparing the book. These efforts include the # 13 | # development, research, and testing of the theories and programs # 14 | # to determine their effectiveness. The authors and publisher make # 15 | # no warranty of any kind, expressed or implied, with regard to these # 16 | # programs or to the documentation contained in these books. The authors # 17 | # and publisher shall not be liable in any event for incidental or # 18 | # consequential damages in connection with, or arising out of, the # 19 | # furnishing, performance, or use of these programs. # 20 | ########################################################################## 21 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.3 Self Check snippets 2 | number1 = int(input('Enter first integer: ')) 3 | 4 | number2 = int(input('Enter second integer: ')) 5 | 6 | total = number1 + number2 7 | 8 | print('The sum of', number1, 'and', number2, 'is', total) 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_05selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.5 Self Check snippets 2 | 3 | # Exercise 2 4 | grade = 85 5 | 6 | if grade >= 60: 7 | print('Passed') 8 | 9 | grade = 55 10 | 11 | if grade >= 60: 12 | print('Passed') 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_06selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.6 Self Check snippets 2 | 3 | # Exercise 2 4 | grade = 80: 5 | 6 | if grade >= 90: 7 | print('A') 8 | else: 9 | print('Not A or B') 10 | elif grade >= 80: 11 | print('B') 12 | 13 | ########################################################################## 14 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 15 | # Pearson Education, Inc. All Rights Reserved. # 16 | # # 17 | # DISCLAIMER: The authors and publisher of this book have used their # 18 | # best efforts in preparing the book. These efforts include the # 19 | # development, research, and testing of the theories and programs # 20 | # to determine their effectiveness. The authors and publisher make # 21 | # no warranty of any kind, expressed or implied, with regard to these # 22 | # programs or to the documentation contained in these books. The authors # 23 | # and publisher shall not be liable in any event for incidental or # 24 | # consequential damages in connection with, or arising out of, the # 25 | # furnishing, performance, or use of these programs. # 26 | ########################################################################## 27 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_07.py: -------------------------------------------------------------------------------- 1 | # Section 3.7 snippets 2 | product = 3 3 | 4 | while product <= 50: 5 | product = product * 3 6 | 7 | product 8 | 9 | 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_07selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.7 Self Check snippets 2 | 3 | # Exercise 2 4 | product = 7 5 | 6 | while product <= 1000: 7 | product = product * 7 8 | 9 | product 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_08selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.8 Self Check snippets 2 | 3 | # Exercise 2 4 | total = 0 5 | 6 | for number in range(1000001): 7 | total = total + number 8 | 9 | total 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_09.py: -------------------------------------------------------------------------------- 1 | # Section 3.9 snippets 2 | total = 0 3 | 4 | for number in [1, 2, 3, 4, 5]: 5 | total += number # add number to total and store in number 6 | 7 | total 8 | 9 | ########################################################################## 10 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 11 | # Pearson Education, Inc. All Rights Reserved. # 12 | # # 13 | # DISCLAIMER: The authors and publisher of this book have used their # 14 | # best efforts in preparing the book. These efforts include the # 15 | # development, research, and testing of the theories and programs # 16 | # to determine their effectiveness. The authors and publisher make # 17 | # no warranty of any kind, expressed or implied, with regard to these # 18 | # programs or to the documentation contained in these books. The authors # 19 | # and publisher shall not be liable in any event for incidental or # 20 | # consequential damages in connection with, or arising out of, the # 21 | # furnishing, performance, or use of these programs. # 22 | ########################################################################## 23 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_09selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.9 Self Checksnippets 2 | 3 | # Exercise 2 4 | x = 12 5 | x **= 2 6 | x 7 | 8 | ########################################################################## 9 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 10 | # Pearson Education, Inc. All Rights Reserved. # 11 | # # 12 | # DISCLAIMER: The authors and publisher of this book have used their # 13 | # best efforts in preparing the book. These efforts include the # 14 | # development, research, and testing of the theories and programs # 15 | # to determine their effectiveness. The authors and publisher make # 16 | # no warranty of any kind, expressed or implied, with regard to these # 17 | # programs or to the documentation contained in these books. The authors # 18 | # and publisher shall not be liable in any event for incidental or # 19 | # consequential damages in connection with, or arising out of, the # 20 | # furnishing, performance, or use of these programs. # 21 | ########################################################################## 22 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_10selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.10 Self Check snippets 2 | number1 = 7 3 | number2 = 5 4 | print(f'{number1} times {number2} is {number1 * number2}') 5 | 6 | ########################################################################## 7 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 8 | # Pearson Education, Inc. All Rights Reserved. # 9 | # # 10 | # DISCLAIMER: The authors and publisher of this book have used their # 11 | # best efforts in preparing the book. These efforts include the # 12 | # development, research, and testing of the theories and programs # 13 | # to determine their effectiveness. The authors and publisher make # 14 | # no warranty of any kind, expressed or implied, with regard to these # 15 | # programs or to the documentation contained in these books. The authors # 16 | # and publisher shall not be liable in any event for incidental or # 17 | # consequential damages in connection with, or arising out of, the # 18 | # furnishing, performance, or use of these programs. # 19 | ########################################################################## 20 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_13.py: -------------------------------------------------------------------------------- 1 | # Section 3.13 snippets 2 | for number in range(5, 10): 3 | print(number, end=' ') 4 | 5 | for number in range(0, 10, 2): 6 | print(number, end=' ') 7 | 8 | for number in range(10, 0, -2): 9 | print(number, end=' ') 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_14selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.14 Self Check snippets 2 | 3 | # Exercise 2 4 | from decimal import Decimal 5 | print(f"{Decimal('37.45') * Decimal('1.0625'):.2f}") 6 | 7 | ########################################################################## 8 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 9 | # Pearson Education, Inc. All Rights Reserved. # 10 | # # 11 | # DISCLAIMER: The authors and publisher of this book have used their # 12 | # best efforts in preparing the book. These efforts include the # 13 | # development, research, and testing of the theories and programs # 14 | # to determine their effectiveness. The authors and publisher make # 15 | # no warranty of any kind, expressed or implied, with regard to these # 16 | # programs or to the documentation contained in these books. The authors # 17 | # and publisher shall not be liable in any event for incidental or # 18 | # consequential damages in connection with, or arising out of, the # 19 | # furnishing, performance, or use of these programs. # 20 | ########################################################################## 21 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_15y.py: -------------------------------------------------------------------------------- 1 | # Section 3.15 snippets 2 | for number in range(100): 3 | if number == 10: 4 | break 5 | print(number, end=' ') 6 | 7 | for number in range(10): 8 | if number == 5: 9 | continue 10 | print(number, end=' ') 11 | 12 | 13 | ########################################################################## 14 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 15 | # Pearson Education, Inc. All Rights Reserved. # 16 | # # 17 | # DISCLAIMER: The authors and publisher of this book have used their # 18 | # best efforts in preparing the book. These efforts include the # 19 | # development, research, and testing of the theories and programs # 20 | # to determine their effectiveness. The authors and publisher make # 21 | # no warranty of any kind, expressed or implied, with regard to these # 22 | # programs or to the documentation contained in these books. The authors # 23 | # and publisher shall not be liable in any event for incidental or # 24 | # consequential damages in connection with, or arising out of, the # 25 | # furnishing, performance, or use of these programs. # 26 | ########################################################################## 27 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_16selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.16 Self Check snippets 2 | 3 | # Exercise 1 4 | i = 1 5 | j = 2 6 | k = 3 7 | m = 2 8 | 9 | (i >= 1) and (j < 4) 10 | 11 | (m <= 99) and (k < m) 12 | 13 | (j >= i) or (k == m) 14 | 15 | (k + m < j) or (3 - j >= k) 16 | 17 | not (k > m) 18 | 19 | ########################################################################## 20 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 21 | # Pearson Education, Inc. All Rights Reserved. # 22 | # # 23 | # DISCLAIMER: The authors and publisher of this book have used their # 24 | # best efforts in preparing the book. These efforts include the # 25 | # development, research, and testing of the theories and programs # 26 | # to determine their effectiveness. The authors and publisher make # 27 | # no warranty of any kind, expressed or implied, with regard to these # 28 | # programs or to the documentation contained in these books. The authors # 29 | # and publisher shall not be liable in any event for incidental or # 30 | # consequential damages in connection with, or arising out of, the # 31 | # furnishing, performance, or use of these programs. # 32 | ########################################################################## 33 | -------------------------------------------------------------------------------- /examples/lesson03/snippets_py/03_17selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.17 Self Check snippets 2 | 3 | # Exercise 4 4 | import statistics 5 | values = [47, 95, 88, 73, 88, 84] 6 | 7 | statistics.mean(values) 8 | 9 | statistics.median(values) 10 | 11 | statistics.mode(values) 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson04/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/.ipynb_checkpoints/04_03selfcheck-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 4.3 Self Check snippets 2 | 3 | # Exercise 3 4 | max([14, 27, 5, 3]) 5 | 6 | min('orange') 7 | 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/.ipynb_checkpoints/04_04selfcheck-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 4.4 Self Check snippets 2 | 3 | # Exercise 3 4 | import random 5 | 6 | for i in range(20): 7 | print('H' if random.randrange(2) == 0 else 'T', end=' ') 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/.ipynb_checkpoints/04_14selfcheck-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 4.14 Self Check snippets 2 | 3 | # Exercise 2 4 | import decimal as dec 5 | 6 | dec.Decimal('2.5') ** 2 7 | Decimal('6.25') 8 | 9 | ########################################################################## 10 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 11 | # Pearson Education, Inc. All Rights Reserved. # 12 | # # 13 | # DISCLAIMER: The authors and publisher of this book have used their # 14 | # best efforts in preparing the book. These efforts include the # 15 | # development, research, and testing of the theories and programs # 16 | # to determine their effectiveness. The authors and publisher make # 17 | # no warranty of any kind, expressed or implied, with regard to these # 18 | # programs or to the documentation contained in these books. The authors # 19 | # and publisher shall not be liable in any event for incidental or # 20 | # consequential damages in connection with, or arising out of, the # 21 | # furnishing, performance, or use of these programs. # 22 | ########################################################################## 23 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/.ipynb_checkpoints/04_15selfcheck-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 4.15 Self Check snippets 2 | 3 | # Exercise 3 4 | width = 15.5 5 | 6 | print('id:', id(width), ' value:', width) 7 | 8 | width = width * 3 9 | 10 | print('id:', id(width), ' value:', width) 11 | 12 | 13 | ########################################################################## 14 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 15 | # Pearson Education, Inc. All Rights Reserved. # 16 | # # 17 | # DISCLAIMER: The authors and publisher of this book have used their # 18 | # best efforts in preparing the book. These efforts include the # 19 | # development, research, and testing of the theories and programs # 20 | # to determine their effectiveness. The authors and publisher make # 21 | # no warranty of any kind, expressed or implied, with regard to these # 22 | # programs or to the documentation contained in these books. The authors # 23 | # and publisher shall not be liable in any event for incidental or # 24 | # consequential damages in connection with, or arising out of, the # 25 | # furnishing, performance, or use of these programs. # 26 | ########################################################################## 27 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/.ipynb_checkpoints/04_17-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 4.17 snippets 2 | 3 | values = [1, 2, 3] 4 | 5 | sum(values) 6 | 7 | sum(values) # same call always returns same result 8 | 9 | values 10 | 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/.ipynb_checkpoints/04_18selfcheck-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 4.18 Self Check snippets 2 | 3 | # Exercise 3 4 | import statistics 5 | 6 | statistics.variance([1, 3, 4, 2, 6, 5, 3, 4, 5, 2]) 7 | 8 | statistics.stdev([1, 3, 4, 2, 6, 5, 3, 4, 5, 2]) 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/.ipynb_checkpoints/ex04_05-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Exercise 4.5 2 | def seconds_since_midnight(***, ***, ***): 3 | hour_in_seconds = *** 4 | minute_in_seconds = *** 5 | return *** 6 | 7 | ########################################################################## 8 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 9 | # Pearson Education, Inc. All Rights Reserved. # 10 | # # 11 | # DISCLAIMER: The authors and publisher of this book have used their # 12 | # best efforts in preparing the book. These efforts include the # 13 | # development, research, and testing of the theories and programs # 14 | # to determine their effectiveness. The authors and publisher make # 15 | # no warranty of any kind, expressed or implied, with regard to these # 16 | # programs or to the documentation contained in these books. The authors # 17 | # and publisher shall not be liable in any event for incidental or # 18 | # consequential damages in connection with, or arising out of, the # 19 | # furnishing, performance, or use of these programs. # 20 | ########################################################################## 21 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_02selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 4.2 Self Check snippets 2 | 3 | # Exercise 3 4 | def square_root(number): 5 | return number ** 0.5 # or number ** (1 / 2) 6 | 7 | square_root(6.25) 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 4.3 Self Check snippets 2 | 3 | # Exercise 3 4 | max([14, 27, 5, 3]) 5 | 6 | min('orange') 7 | 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_04selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 4.4 Self Check snippets 2 | 3 | # Exercise 3 4 | import random 5 | 6 | for i in range(20): 7 | print('H' if random.randrange(2) == 0 else 'T', end=' ') 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_05selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 4.5 Self Check snippets 2 | 3 | # Exercise 2 4 | student = ('Sue', [89, 94, 85]) 5 | 6 | student 7 | 8 | name, grades = student 9 | 10 | print(f'{name}: {grades}') 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_07.py: -------------------------------------------------------------------------------- 1 | # Section 4.7 snippets 2 | import math 3 | 4 | math.sqrt(900) 5 | 6 | math.fabs(-10) 7 | 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_08.py: -------------------------------------------------------------------------------- 1 | # Section 4.8 snippets 2 | 3 | import math 4 | 5 | ma # press after ma 6 | 7 | # Viewing Identifiers in a Module 8 | math. # press after the dot 9 | 10 | # Using the Currently Highlighted Function 11 | math.fabs? 12 | 13 | ########################################################################## 14 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 15 | # Pearson Education, Inc. All Rights Reserved. # 16 | # # 17 | # DISCLAIMER: The authors and publisher of this book have used their # 18 | # best efforts in preparing the book. These efforts include the # 19 | # development, research, and testing of the theories and programs # 20 | # to determine their effectiveness. The authors and publisher make # 21 | # no warranty of any kind, expressed or implied, with regard to these # 22 | # programs or to the documentation contained in these books. The authors # 23 | # and publisher shall not be liable in any event for incidental or # 24 | # consequential damages in connection with, or arising out of, the # 25 | # furnishing, performance, or use of these programs. # 26 | ########################################################################## 27 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_09.py: -------------------------------------------------------------------------------- 1 | # Section 4.9 snippets 2 | def rectangle_area(length=2, width=3): 3 | """Return a rectangle's area.""" 4 | return length * width 5 | 6 | rectangle_area() 7 | 8 | rectangle_area(10) 9 | 10 | rectangle_area(10, 5) 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_09selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.9 Self Checksnippets 2 | 3 | # Exercise 2 4 | x = 12 5 | x **= 2 6 | x 7 | 8 | ########################################################################## 9 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 10 | # Pearson Education, Inc. All Rights Reserved. # 11 | # # 12 | # DISCLAIMER: The authors and publisher of this book have used their # 13 | # best efforts in preparing the book. These efforts include the # 14 | # development, research, and testing of the theories and programs # 15 | # to determine their effectiveness. The authors and publisher make # 16 | # no warranty of any kind, expressed or implied, with regard to these # 17 | # programs or to the documentation contained in these books. The authors # 18 | # and publisher shall not be liable in any event for incidental or # 19 | # consequential damages in connection with, or arising out of, the # 20 | # furnishing, performance, or use of these programs. # 21 | ########################################################################## 22 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_10.py: -------------------------------------------------------------------------------- 1 | # Section 4.10 snippets 2 | def rectangle_area(length, width): 3 | """Return a rectangle's area.""" 4 | return length * width 5 | 6 | rectangle_area(width=5, length=10) 7 | 8 | ########################################################################## 9 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 10 | # Pearson Education, Inc. All Rights Reserved. # 11 | # # 12 | # DISCLAIMER: The authors and publisher of this book have used their # 13 | # best efforts in preparing the book. These efforts include the # 14 | # development, research, and testing of the theories and programs # 15 | # to determine their effectiveness. The authors and publisher make # 16 | # no warranty of any kind, expressed or implied, with regard to these # 17 | # programs or to the documentation contained in these books. The authors # 18 | # and publisher shall not be liable in any event for incidental or # 19 | # consequential damages in connection with, or arising out of, the # 20 | # furnishing, performance, or use of these programs. # 21 | ########################################################################## 22 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_10selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.10 Self Check snippets 2 | number1 = 7 3 | number2 = 5 4 | print(f'{number1} times {number2} is {number1 * number2}') 5 | 6 | ########################################################################## 7 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 8 | # Pearson Education, Inc. All Rights Reserved. # 9 | # # 10 | # DISCLAIMER: The authors and publisher of this book have used their # 11 | # best efforts in preparing the book. These efforts include the # 12 | # development, research, and testing of the theories and programs # 13 | # to determine their effectiveness. The authors and publisher make # 14 | # no warranty of any kind, expressed or implied, with regard to these # 15 | # programs or to the documentation contained in these books. The authors # 16 | # and publisher shall not be liable in any event for incidental or # 17 | # consequential damages in connection with, or arising out of, the # 18 | # furnishing, performance, or use of these programs. # 19 | ########################################################################## 20 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_11selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.7 Self Check snippets 2 | 3 | # Exercise 2 4 | product = 7 5 | 6 | while product <= 1000: 7 | product = product * 7 8 | 9 | product 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_12.py: -------------------------------------------------------------------------------- 1 | # Section 4.12 snippets 2 | s = 'Hello' 3 | 4 | s.lower() # call lower method on string object s 5 | 6 | s.upper() 7 | 8 | s 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_12selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 3.8 Self Check snippets 2 | 3 | # Exercise 2 4 | total = 0 5 | 6 | for number in range(1000001): 7 | total = total + number 8 | 9 | total 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_14selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 4.14 Self Check snippets 2 | 3 | # Exercise 2 4 | import decimal as dec 5 | 6 | dec.Decimal('2.5') ** 2 7 | Decimal('6.25') 8 | 9 | ########################################################################## 10 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 11 | # Pearson Education, Inc. All Rights Reserved. # 12 | # # 13 | # DISCLAIMER: The authors and publisher of this book have used their # 14 | # best efforts in preparing the book. These efforts include the # 15 | # development, research, and testing of the theories and programs # 16 | # to determine their effectiveness. The authors and publisher make # 17 | # no warranty of any kind, expressed or implied, with regard to these # 18 | # programs or to the documentation contained in these books. The authors # 19 | # and publisher shall not be liable in any event for incidental or # 20 | # consequential damages in connection with, or arising out of, the # 21 | # furnishing, performance, or use of these programs. # 22 | ########################################################################## 23 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_15selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 4.15 Self Check snippets 2 | 3 | # Exercise 3 4 | width = 15.5 5 | 6 | print('id:', id(width), ' value:', width) 7 | 8 | width = width * 3 9 | 10 | print('id:', id(width), ' value:', width) 11 | 12 | 13 | ########################################################################## 14 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 15 | # Pearson Education, Inc. All Rights Reserved. # 16 | # # 17 | # DISCLAIMER: The authors and publisher of this book have used their # 18 | # best efforts in preparing the book. These efforts include the # 19 | # development, research, and testing of the theories and programs # 20 | # to determine their effectiveness. The authors and publisher make # 21 | # no warranty of any kind, expressed or implied, with regard to these # 22 | # programs or to the documentation contained in these books. The authors # 23 | # and publisher shall not be liable in any event for incidental or # 24 | # consequential damages in connection with, or arising out of, the # 25 | # furnishing, performance, or use of these programs. # 26 | ########################################################################## 27 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_17.py: -------------------------------------------------------------------------------- 1 | # Section 4.17 snippets 2 | 3 | values = [1, 2, 3] 4 | 5 | sum(values) 6 | 7 | sum(values) # same call always returns same result 8 | 9 | values 10 | 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson04/snippets_py/04_18selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 4.18 Self Check snippets 2 | 3 | # Exercise 3 4 | import statistics 5 | 6 | statistics.variance([1, 3, 4, 2, 6, 5, 3, 4, 5, 2]) 7 | 8 | statistics.stdev([1, 3, 4, 2, 6, 5, 3, 4, 5, 2]) 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_ipynb/RollDie.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | get_ipython().run_line_magic('matplotlib', 'inline') 3 | import matplotlib.pyplot as plt 4 | import numpy as np 5 | import random 6 | import seaborn as sns 7 | rolls = [random.randrange(1, 7) for i in range(600)] 8 | values, frequencies = np.unique(rolls, return_counts=True) 9 | title = f'Rolling a Six-Sided Die {len(rolls):,} Times' 10 | sns.set_style('whitegrid') 11 | axes = sns.barplot(x=values, y=frequencies, palette='bright') 12 | axes.set_title(title) 13 | axes.set(xlabel='Die Value', ylabel='Frequency') 14 | axes.set_ylim(top=max(frequencies) * 1.10) 15 | for bar, frequency in zip(axes.patches, frequencies): 16 | text_x = bar.get_x() + bar.get_width() / 2.0 17 | text_y = bar.get_height() 18 | text = f'{frequency:,}\n{frequency / len(rolls):.3%}' 19 | axes.text(text_x, text_y, text, 20 | fontsize=11, ha='center', va='bottom') 21 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson05/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson05/snippets_py/.ipynb_checkpoints/05_13selfcheck-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 5.13 Self Check snippets 2 | 3 | # Exercise 2 4 | list(x ** 3 for x in [10, 3, 7, 1, 9, 4, 2] if x % 2 == 0) 5 | 6 | ########################################################################## 7 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 8 | # Pearson Education, Inc. All Rights Reserved. # 9 | # # 10 | # DISCLAIMER: The authors and publisher of this book have used their # 11 | # best efforts in preparing the book. These efforts include the # 12 | # development, research, and testing of the theories and programs # 13 | # to determine their effectiveness. The authors and publisher make # 14 | # no warranty of any kind, expressed or implied, with regard to these # 15 | # programs or to the documentation contained in these books. The authors # 16 | # and publisher shall not be liable in any event for incidental or # 17 | # consequential damages in connection with, or arising out of, the # 18 | # furnishing, performance, or use of these programs. # 19 | ########################################################################## 20 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_py/05_03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 5.3 Self Check snippets 2 | 3 | # Exercise 3 4 | single = (123.45,) 5 | 6 | single 7 | 8 | # Exercise 4 9 | [1, 2, 3] + (4, 5, 6) 10 | 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_py/05_06selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 5.6 Self Check snippets 2 | 3 | # Exercise 2 4 | numbers = list(range(1, 16)) 5 | 6 | numbers 7 | 8 | del numbers[0:4] 9 | 10 | numbers 11 | 12 | del numbers[::2] 13 | 14 | numbers 15 | 16 | 17 | 18 | 19 | ########################################################################## 20 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 21 | # Pearson Education, Inc. All Rights Reserved. # 22 | # # 23 | # DISCLAIMER: The authors and publisher of this book have used their # 24 | # best efforts in preparing the book. These efforts include the # 25 | # development, research, and testing of the theories and programs # 26 | # to determine their effectiveness. The authors and publisher make # 27 | # no warranty of any kind, expressed or implied, with regard to these # 28 | # programs or to the documentation contained in these books. The authors # 29 | # and publisher shall not be liable in any event for incidental or # 30 | # consequential damages in connection with, or arising out of, the # 31 | # furnishing, performance, or use of these programs. # 32 | ########################################################################## 33 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_py/05_08selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 5.8 Self Check snippets 2 | 3 | # Exercise 3 4 | foods = ['Cookies', 'pizza', 'Grapes', 'apples', 'steak', 'Bacon'] 5 | 6 | foods.sort() 7 | 8 | foods 9 | 10 | 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_py/05_09selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 5.9 Self Checksnippets 2 | 3 | # Exercise 3 4 | numbers = [67, 12, 46, 43, 13] 5 | 6 | numbers.index(43) 7 | 8 | if 44 in numbers: 9 | print(f'Found 44 at index: {numbers.index(44)}') 10 | else: 11 | print('44 not found') 12 | 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_py/05_12selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 5.12 Self Check snippets 2 | 3 | # Exercise 3 4 | cubes = [(x, x ** 3) for x in range(1, 6)] 5 | 6 | cubes 7 | 8 | # Exercise 4 9 | multiples = [x for x in range(3, 30, 3)] 10 | 11 | multiples 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_py/05_13.py: -------------------------------------------------------------------------------- 1 | # Section 5.13 snippets 2 | numbers = [10, 3, 7, 1, 9, 4, 2, 8, 5, 6] 3 | 4 | for value in (x ** 2 for x in numbers if x % 2 != 0): 5 | print(value, end=' ') 6 | 7 | squares_of_odds = (x ** 2 for x in numbers if x % 2 != 0) 8 | 9 | squares_of_odds 10 | 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson05/snippets_py/05_13selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 5.13 Self Check snippets 2 | 3 | # Exercise 2 4 | list(x ** 3 for x in [10, 3, 7, 1, 9, 4, 2] if x % 2 == 0) 5 | 6 | ########################################################################## 7 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 8 | # Pearson Education, Inc. All Rights Reserved. # 9 | # # 10 | # DISCLAIMER: The authors and publisher of this book have used their # 11 | # best efforts in preparing the book. These efforts include the # 12 | # development, research, and testing of the theories and programs # 13 | # to determine their effectiveness. The authors and publisher make # 14 | # no warranty of any kind, expressed or implied, with regard to these # 15 | # programs or to the documentation contained in these books. The authors # 16 | # and publisher shall not be liable in any event for incidental or # 17 | # consequential damages in connection with, or arising out of, the # 18 | # furnishing, performance, or use of these programs. # 19 | ########################################################################## 20 | -------------------------------------------------------------------------------- /examples/lesson05/temp.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import random 5 | import seaborn as sns 6 | rolls = [random.randrange(1, 7) for i in range(600)] 7 | values, frequencies = np.unique(rolls, return_counts=True) 8 | title = f'Rolling a Six-Sided Die {len(rolls):,} Times' 9 | sns.set_style('whitegrid') 10 | axes = sns.barplot(x=values, y=frequencies, palette='bright') 11 | axes.set_title(title) 12 | axes.set(xlabel='Die Value', ylabel='Frequency') 13 | axes.set_ylim(top=max(frequencies) * 1.10) 14 | for bar, frequency in zip(axes.patches, frequencies): 15 | text_x = bar.get_x() + bar.get_width() / 2.0 16 | text_y = bar.get_height() 17 | text = f'{frequency:,}\n{frequency / len(rolls):.3%}' 18 | axes.text(text_x, text_y, text, 19 | fontsize=11, ha='center', va='bottom') 20 | 21 | -------------------------------------------------------------------------------- /examples/lesson06/fig06_02.py: -------------------------------------------------------------------------------- 1 | # fig06_02.py 2 | """Tokenizing a string and counting unique words.""" 3 | 4 | text = ('this is sample text with several words ' 5 | 'this is more sample text with some different words') 6 | 7 | word_counts = {} 8 | 9 | # count occurrences of each unique word 10 | for word in text.split(): 11 | if word in word_counts: 12 | word_counts[word] += 1 # update existing key-value pair 13 | else: 14 | word_counts[word] = 1 # insert new key-value pair 15 | 16 | print(f'{"WORD":<12}COUNT') 17 | 18 | for word, count in sorted(word_counts.items()): 19 | print(f'{word:<12}{count}') 20 | 21 | print('\nNumber of unique words:', len(word_counts)) 22 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson06/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.02.01selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 6.2.1 Self Check snippets 2 | 3 | # Exercise 3 4 | states = {'VT': 'Vermont', 'NH': 'New Hampshire', 5 | 'MA': 'Massachusetts'} 6 | 7 | states 8 | 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.02.02.py: -------------------------------------------------------------------------------- 1 | # Section 6.2.2 snippets 2 | days_per_month = {'January': 31, 'February': 28, 'March': 31} 3 | 4 | days_per_month 5 | 6 | for month, days in days_per_month.items(): 7 | print(f'{month} has {days} days') 8 | 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.02.03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 6.2.3 Self Check snippets 2 | 3 | # Exercise 3 4 | roman_numerals = {'I': 1, 'II': 2, 'III': 3, 'V': 5, 'X': 100} 5 | 6 | roman_numerals['x'] = 10 7 | 8 | roman_numerals 9 | 10 | 11 | 12 | 13 | ########################################################################## 14 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 15 | # Pearson Education, Inc. All Rights Reserved. # 16 | # # 17 | # DISCLAIMER: The authors and publisher of this book have used their # 18 | # best efforts in preparing the book. These efforts include the # 19 | # development, research, and testing of the theories and programs # 20 | # to determine their effectiveness. The authors and publisher make # 21 | # no warranty of any kind, expressed or implied, with regard to these # 22 | # programs or to the documentation contained in these books. The authors # 23 | # and publisher shall not be liable in any event for incidental or # 24 | # consequential damages in connection with, or arising out of, the # 25 | # furnishing, performance, or use of these programs. # 26 | ########################################################################## 27 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.02.04selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 6.2.4 Self Check snippets 2 | 3 | # Exercise 3 4 | roman_numerals = {'I': 1, 'II': 2, 'III': 3, 'V': 5} 5 | 6 | list(roman_numerals.keys()) 7 | 8 | list(roman_numerals.values()) 9 | 10 | list(roman_numerals.items()) 11 | 12 | 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.02.09selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 6.2.9 Self Check snippets 2 | 3 | # Exercise 1 4 | {number: number ** 3 for number in range(1, 6)} 5 | 6 | 7 | 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.03.00.selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 6.3 Self Check snippets 2 | 3 | # Exercise 3 4 | text = 'to be or not to be that is the question' 5 | 6 | unique_words = set(text.split()) 7 | 8 | for word in sorted(unique_words): 9 | print(word, end=' ') 10 | 11 | 12 | 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.03.01selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 6.3.1 Self Check snippets 2 | 3 | # Exercise 3 4 | set('abc def ghi jkl mno').issuperset('hi mom') 5 | 6 | 7 | 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.03.02selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 6.3.2 Self Check snippets 2 | 3 | # Exercise 2 4 | {10, 20, 30} - {5, 10, 15, 20} 5 | 6 | {10, 20, 30} ^ {5, 10, 15, 20} 7 | 8 | {10, 20, 30} | {5, 10, 15, 20} 9 | 10 | {10, 20, 30} & {5, 10, 15, 20} 11 | 12 | 13 | 14 | 15 | 16 | ########################################################################## 17 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 18 | # Pearson Education, Inc. All Rights Reserved. # 19 | # # 20 | # DISCLAIMER: The authors and publisher of this book have used their # 21 | # best efforts in preparing the book. These efforts include the # 22 | # development, research, and testing of the theories and programs # 23 | # to determine their effectiveness. The authors and publisher make # 24 | # no warranty of any kind, expressed or implied, with regard to these # 25 | # programs or to the documentation contained in these books. The authors # 26 | # and publisher shall not be liable in any event for incidental or # 27 | # consequential damages in connection with, or arising out of, the # 28 | # furnishing, performance, or use of these programs. # 29 | ########################################################################## 30 | -------------------------------------------------------------------------------- /examples/lesson06/snippets_py/06.03.04.py: -------------------------------------------------------------------------------- 1 | # Section 6.3.4 snippets 2 | numbers = [1, 2, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 10] 3 | 4 | evens = {item for item in numbers if item % 2 == 0} 5 | 6 | evens 7 | 8 | 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson07/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_02.py: -------------------------------------------------------------------------------- 1 | # Section 7.2 snippets 2 | import numpy as np 3 | 4 | numbers = np.array([2, 3, 5, 7, 11]) 5 | 6 | type(numbers) 7 | 8 | numbers 9 | 10 | # Multidimensional Arguments 11 | np.array([[1, 2, 3], [4, 5, 6]]) 12 | 13 | ########################################################################## 14 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 15 | # Pearson Education, Inc. All Rights Reserved. # 16 | # # 17 | # DISCLAIMER: The authors and publisher of this book have used their # 18 | # best efforts in preparing the book. These efforts include the # 19 | # development, research, and testing of the theories and programs # 20 | # to determine their effectiveness. The authors and publisher make # 21 | # no warranty of any kind, expressed or implied, with regard to these # 22 | # programs or to the documentation contained in these books. The authors # 23 | # and publisher shall not be liable in any event for incidental or # 24 | # consequential damages in connection with, or arising out of, the # 25 | # furnishing, performance, or use of these programs. # 26 | ########################################################################## 27 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_02selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.2 Self Check snippets 2 | 3 | # Exercise 2 4 | import numpy as np 5 | 6 | np.array([x for x in range(2, 21, 2)]) 7 | 8 | # Exercise 3 9 | np.array([[2, 4, 6, 8, 10], [1, 3, 5, 7, 9]]) 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.3 Self Check snippets 2 | 3 | # Exercise 1 4 | import numpy as np 5 | 6 | a = np.array([[2, 4, 6, 8, 10], [1, 3, 5, 7, 9]]) 7 | 8 | a.ndim 9 | 10 | a.shape 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_04.py: -------------------------------------------------------------------------------- 1 | # Section 7.4 snippets 2 | import numpy as np 3 | 4 | np.zeros(5) 5 | 6 | np.ones((2, 4), dtype=int) 7 | 8 | np.full((3, 5), 13) 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_05selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.5 Self Check snippets 2 | 3 | # Exercise 2 4 | import numpy as np 5 | 6 | np.arange(2, 41, 2).reshape(4, 5) 7 | 8 | ########################################################################## 9 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 10 | # Pearson Education, Inc. All Rights Reserved. # 11 | # # 12 | # DISCLAIMER: The authors and publisher of this book have used their # 13 | # best efforts in preparing the book. These efforts include the # 14 | # development, research, and testing of the theories and programs # 15 | # to determine their effectiveness. The authors and publisher make # 16 | # no warranty of any kind, expressed or implied, with regard to these # 17 | # programs or to the documentation contained in these books. The authors # 18 | # and publisher shall not be liable in any event for incidental or # 19 | # consequential damages in connection with, or arising out of, the # 20 | # furnishing, performance, or use of these programs. # 21 | ########################################################################## 22 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_06selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.6 Self Check snippets 2 | 3 | # Exercise 1 4 | import numpy as np 5 | 6 | %timeit sum([x for x in range(10_000_000)]) 7 | 8 | %timeit np.arange(10_000_000).sum() 9 | 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_07selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.7 Self Check snippets 2 | 3 | # Exercise 2 4 | import numpy as np 5 | 6 | np.arange(1, 6) ** 2 7 | 8 | 9 | ########################################################################## 10 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 11 | # Pearson Education, Inc. All Rights Reserved. # 12 | # # 13 | # DISCLAIMER: The authors and publisher of this book have used their # 14 | # best efforts in preparing the book. These efforts include the # 15 | # development, research, and testing of the theories and programs # 16 | # to determine their effectiveness. The authors and publisher make # 17 | # no warranty of any kind, expressed or implied, with regard to these # 18 | # programs or to the documentation contained in these books. The authors # 19 | # and publisher shall not be liable in any event for incidental or # 20 | # consequential damages in connection with, or arising out of, the # 21 | # furnishing, performance, or use of these programs. # 22 | ########################################################################## 23 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_08selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.8 Self Check snippets 2 | 3 | # Exercise 2 4 | import numpy as np 5 | 6 | grades = np.random.randint(60, 101, 12).reshape(3, 4) 7 | 8 | grades 9 | 10 | grades.mean() 11 | 12 | grades.mean(axis=0) 13 | 14 | grades.mean(axis=1) 15 | 16 | 17 | 18 | 19 | ########################################################################## 20 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 21 | # Pearson Education, Inc. All Rights Reserved. # 22 | # # 23 | # DISCLAIMER: The authors and publisher of this book have used their # 24 | # best efforts in preparing the book. These efforts include the # 25 | # development, research, and testing of the theories and programs # 26 | # to determine their effectiveness. The authors and publisher make # 27 | # no warranty of any kind, expressed or implied, with regard to these # 28 | # programs or to the documentation contained in these books. The authors # 29 | # and publisher shall not be liable in any event for incidental or # 30 | # consequential damages in connection with, or arising out of, the # 31 | # furnishing, performance, or use of these programs. # 32 | ########################################################################## 33 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_09selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.9 Self Checksnippets 2 | 3 | # Exercise 2 4 | import numpy as np 5 | 6 | numbers = np.arange(1, 6) 7 | 8 | np.power(numbers, 3) 9 | 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_10selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.10 Self Checksnippets 2 | 3 | # Exercise 1 4 | import numpy as np 5 | 6 | a = np.arange(1, 16).reshape(3, 5) 7 | 8 | a 9 | 10 | a[1] 11 | 12 | a[[0, 2]] 13 | 14 | a[:, 1:4] 15 | 16 | 17 | ########################################################################## 18 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 19 | # Pearson Education, Inc. All Rights Reserved. # 20 | # # 21 | # DISCLAIMER: The authors and publisher of this book have used their # 22 | # best efforts in preparing the book. These efforts include the # 23 | # development, research, and testing of the theories and programs # 24 | # to determine their effectiveness. The authors and publisher make # 25 | # no warranty of any kind, expressed or implied, with regard to these # 26 | # programs or to the documentation contained in these books. The authors # 27 | # and publisher shall not be liable in any event for incidental or # 28 | # consequential damages in connection with, or arising out of, the # 29 | # furnishing, performance, or use of these programs. # 30 | ########################################################################## 31 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_12.py: -------------------------------------------------------------------------------- 1 | # Section 7.12 snippets 2 | import numpy as np 3 | 4 | numbers = np.arange(1, 6) 5 | 6 | numbers 7 | 8 | numbers2 = numbers.copy() 9 | 10 | numbers2 11 | 12 | numbers[1] *= 10 13 | 14 | numbers 15 | 16 | numbers2 17 | 18 | 19 | 20 | ########################################################################## 21 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 22 | # Pearson Education, Inc. All Rights Reserved. # 23 | # # 24 | # DISCLAIMER: The authors and publisher of this book have used their # 25 | # best efforts in preparing the book. These efforts include the # 26 | # development, research, and testing of the theories and programs # 27 | # to determine their effectiveness. The authors and publisher make # 28 | # no warranty of any kind, expressed or implied, with regard to these # 29 | # programs or to the documentation contained in these books. The authors # 30 | # and publisher shall not be liable in any event for incidental or # 31 | # consequential damages in connection with, or arising out of, the # 32 | # furnishing, performance, or use of these programs. # 33 | ########################################################################## 34 | -------------------------------------------------------------------------------- /examples/lesson07/snippets_py/07_13selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 7.13 Self Check snippets 2 | 3 | # Exercise 1 4 | import numpy as np 5 | 6 | a = np.arange(1, 7).reshape(2, 3) 7 | 8 | a = np.hstack((a, a)) 9 | 10 | a = np.vstack((a, a)) 11 | 12 | a 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson08/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_02.01selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.2.1 Self Check snippets 2 | 3 | # Exercise 3 4 | print(f'{58:c}{45:c}{41:c}') 5 | 6 | ########################################################################## 7 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 8 | # Pearson Education, Inc. All Rights Reserved. # 9 | # # 10 | # DISCLAIMER: The authors and publisher of this book have used their # 11 | # best efforts in preparing the book. These efforts include the # 12 | # development, research, and testing of the theories and programs # 13 | # to determine their effectiveness. The authors and publisher make # 14 | # no warranty of any kind, expressed or implied, with regard to these # 15 | # programs or to the documentation contained in these books. The authors # 16 | # and publisher shall not be liable in any event for incidental or # 17 | # consequential damages in connection with, or arising out of, the # 18 | # furnishing, performance, or use of these programs. # 19 | ########################################################################## 20 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_02.02selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.2.2 Self Check snippets 2 | 3 | # Exercise 2 4 | print(f'[{"Amanda":>10}]\n[{"Amanda":^10}]\n[{"Amanda":<10}]') 5 | 6 | 7 | ########################################################################## 8 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 9 | # Pearson Education, Inc. All Rights Reserved. # 10 | # # 11 | # DISCLAIMER: The authors and publisher of this book have used their # 12 | # best efforts in preparing the book. These efforts include the # 13 | # development, research, and testing of the theories and programs # 14 | # to determine their effectiveness. The authors and publisher make # 15 | # no warranty of any kind, expressed or implied, with regard to these # 16 | # programs or to the documentation contained in these books. The authors # 17 | # and publisher shall not be liable in any event for incidental or # 18 | # consequential damages in connection with, or arising out of, the # 19 | # furnishing, performance, or use of these programs. # 20 | ########################################################################## 21 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_02.03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.2.3 Self Check snippets 2 | 3 | # Exercise 2 4 | print(f'{10240.473:+10,.2f}\n{-3210.9521:+10,.2f}') 5 | 6 | ########################################################################## 7 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 8 | # Pearson Education, Inc. All Rights Reserved. # 9 | # # 10 | # DISCLAIMER: The authors and publisher of this book have used their # 11 | # best efforts in preparing the book. These efforts include the # 12 | # development, research, and testing of the theories and programs # 13 | # to determine their effectiveness. The authors and publisher make # 14 | # no warranty of any kind, expressed or implied, with regard to these # 15 | # programs or to the documentation contained in these books. The authors # 16 | # and publisher shall not be liable in any event for incidental or # 17 | # consequential damages in connection with, or arising out of, the # 18 | # furnishing, performance, or use of these programs. # 19 | ########################################################################## 20 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_02.04selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.2.4 Self Check snippets 2 | 3 | # Exercise 1 4 | print('{:c} {:c} {:c}'.format(58, 45, 41)) 5 | 6 | print('[{0:>10}]\n[{0:^10}]\n[{0:<10}]'.format('Amanda')) 7 | 8 | print('{:+10,.2f}\n{:+10,.2f}'.format(10240.473, -3210.9521)) 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_03.py: -------------------------------------------------------------------------------- 1 | # Section 8.3 snippets 2 | s1 = 'happy' 3 | 4 | s2 = 'birthday' 5 | 6 | s1 += ' ' + s2 7 | 8 | s1 9 | 10 | symbol = '>' 11 | 12 | symbol *= 5 13 | 14 | symbol 15 | 16 | 17 | 18 | ########################################################################## 19 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 20 | # Pearson Education, Inc. All Rights Reserved. # 21 | # # 22 | # DISCLAIMER: The authors and publisher of this book have used their # 23 | # best efforts in preparing the book. These efforts include the # 24 | # development, research, and testing of the theories and programs # 25 | # to determine their effectiveness. The authors and publisher make # 26 | # no warranty of any kind, expressed or implied, with regard to these # 27 | # programs or to the documentation contained in these books. The authors # 28 | # and publisher shall not be liable in any event for incidental or # 29 | # consequential damages in connection with, or arising out of, the # 30 | # furnishing, performance, or use of these programs. # 31 | ########################################################################## 32 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.3 Self Check snippets 2 | 3 | # Exercise 1 4 | name = 'Pam' 5 | 6 | name += ' Black' 7 | 8 | bar = '*' 9 | 10 | bar *= len(name) 11 | 12 | print(f'{bar}\n{name}\n{bar}') 13 | 14 | 15 | 16 | 17 | ########################################################################## 18 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 19 | # Pearson Education, Inc. All Rights Reserved. # 20 | # # 21 | # DISCLAIMER: The authors and publisher of this book have used their # 22 | # best efforts in preparing the book. These efforts include the # 23 | # development, research, and testing of the theories and programs # 24 | # to determine their effectiveness. The authors and publisher make # 25 | # no warranty of any kind, expressed or implied, with regard to these # 26 | # programs or to the documentation contained in these books. The authors # 27 | # and publisher shall not be liable in any event for incidental or # 28 | # consequential damages in connection with, or arising out of, the # 29 | # furnishing, performance, or use of these programs. # 30 | ########################################################################## 31 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_04selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.4 Self Check snippets 2 | 3 | # Exercise 1 4 | name = ' Margo Magenta ' 5 | 6 | name.strip() 7 | 8 | name.lstrip() 9 | 10 | name.rstrip() 11 | 12 | 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_05.py: -------------------------------------------------------------------------------- 1 | # Section 8.5 snippets 2 | 3 | # Capitalizing Only a String’s First Character 4 | 'happy birthday'.capitalize() 5 | 6 | # Capitalizing the First Character of Every Word in a String 7 | 'strings: a deeper look'.title() 8 | 9 | 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_05selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.5 Self Check snippets 2 | 3 | # Exercise 1 4 | test_string = 'happy new year' 5 | 6 | test_string.capitalize() 7 | 8 | test_string.title() 9 | 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_06.py: -------------------------------------------------------------------------------- 1 | # Section 8.6 snippets 2 | 3 | print(f'A: {ord("A")}; a: {ord("a")}') 4 | 5 | 'Orange' == 'orange' 6 | 7 | 'Orange' != 'orange' 8 | 9 | 'Orange' < 'orange' 10 | 11 | 'Orange' <= 'orange' 12 | 13 | 'Orange' > 'orange' 14 | 15 | 'Orange' >= 'orange' 16 | 17 | 18 | 19 | ########################################################################## 20 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 21 | # Pearson Education, Inc. All Rights Reserved. # 22 | # # 23 | # DISCLAIMER: The authors and publisher of this book have used their # 24 | # best efforts in preparing the book. These efforts include the # 25 | # development, research, and testing of the theories and programs # 26 | # to determine their effectiveness. The authors and publisher make # 27 | # no warranty of any kind, expressed or implied, with regard to these # 28 | # programs or to the documentation contained in these books. The authors # 29 | # and publisher shall not be liable in any event for incidental or # 30 | # consequential damages in connection with, or arising out of, the # 31 | # furnishing, performance, or use of these programs. # 32 | ########################################################################## 33 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_07selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.7 Self Check snippets 2 | 3 | # Exercise 3 4 | for word in 'to be or not to be that is the question'.split(): 5 | if word.startswith('t'): 6 | print(word, end=' ') 7 | 8 | 9 | 10 | ########################################################################## 11 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 12 | # Pearson Education, Inc. All Rights Reserved. # 13 | # # 14 | # DISCLAIMER: The authors and publisher of this book have used their # 15 | # best efforts in preparing the book. These efforts include the # 16 | # development, research, and testing of the theories and programs # 17 | # to determine their effectiveness. The authors and publisher make # 18 | # no warranty of any kind, expressed or implied, with regard to these # 19 | # programs or to the documentation contained in these books. The authors # 20 | # and publisher shall not be liable in any event for incidental or # 21 | # consequential damages in connection with, or arising out of, the # 22 | # furnishing, performance, or use of these programs. # 23 | ########################################################################## 24 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_08.py: -------------------------------------------------------------------------------- 1 | # Section 8.8 snippets 2 | values = '1\t2\t3\t4\t5' 3 | 4 | values.replace('\t', ',') 5 | 6 | 7 | 8 | 9 | ########################################################################## 10 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 11 | # Pearson Education, Inc. All Rights Reserved. # 12 | # # 13 | # DISCLAIMER: The authors and publisher of this book have used their # 14 | # best efforts in preparing the book. These efforts include the # 15 | # development, research, and testing of the theories and programs # 16 | # to determine their effectiveness. The authors and publisher make # 17 | # no warranty of any kind, expressed or implied, with regard to these # 18 | # programs or to the documentation contained in these books. The authors # 19 | # and publisher shall not be liable in any event for incidental or # 20 | # consequential damages in connection with, or arising out of, the # 21 | # furnishing, performance, or use of these programs. # 22 | ########################################################################## 23 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_08selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.8 Self Check snippets 2 | 3 | # Exercise 1 4 | '1 2 3 4 5'.replace(' ', ' --> ') 5 | 6 | 7 | 8 | 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_10.py: -------------------------------------------------------------------------------- 1 | # Section 8.10 snippets 2 | '-27'.isdigit() 3 | 4 | '27'.isdigit() 5 | 6 | 'A9876'.isalnum() 7 | 8 | '123 Main Street'.isalnum() 9 | 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_11.py: -------------------------------------------------------------------------------- 1 | # Section 8.11 snippets 2 | file_path = 'C:\\MyFolder\\MySubFolder\\MyFile.txt' 3 | 4 | file_path 5 | 6 | file_path = r'C:\MyFolder\MySubFolder\MyFile.txt' 7 | 8 | file_path 9 | 10 | 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_12.02selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.12.2 Self Check snippets 2 | 3 | # Exercise 1 4 | import re 5 | 6 | re.sub(r'\t+', ', ', 'A\tB\t\tC\t\t\tD') 7 | 8 | # Exercise 2 9 | re.split('\$+', '123$Main$$Street') 10 | 11 | 12 | 13 | ########################################################################## 14 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 15 | # Pearson Education, Inc. All Rights Reserved. # 16 | # # 17 | # DISCLAIMER: The authors and publisher of this book have used their # 18 | # best efforts in preparing the book. These efforts include the # 19 | # development, research, and testing of the theories and programs # 20 | # to determine their effectiveness. The authors and publisher make # 21 | # no warranty of any kind, expressed or implied, with regard to these # 22 | # programs or to the documentation contained in these books. The authors # 23 | # and publisher shall not be liable in any event for incidental or # 24 | # consequential damages in connection with, or arising out of, the # 25 | # furnishing, performance, or use of these programs. # 26 | ########################################################################## 27 | -------------------------------------------------------------------------------- /examples/lesson08/snippets_py/08_12.03selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 8.12.3 Self Check snippets 2 | 3 | # Exercise 2 4 | import re 5 | 6 | result = re.search(r'(\d+) ([-+*/]) (\d+)', '10 + 5') 7 | 8 | result.groups() 9 | 10 | result.group(1) 11 | 12 | result.group(2) 13 | 14 | result.group(3) 15 | 16 | 17 | 18 | ########################################################################## 19 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 20 | # Pearson Education, Inc. All Rights Reserved. # 21 | # # 22 | # DISCLAIMER: The authors and publisher of this book have used their # 23 | # best efforts in preparing the book. These efforts include the # 24 | # development, research, and testing of the theories and programs # 25 | # to determine their effectiveness. The authors and publisher make # 26 | # no warranty of any kind, expressed or implied, with regard to these # 27 | # programs or to the documentation contained in these books. The authors # 28 | # and publisher shall not be liable in any event for incidental or # 29 | # consequential damages in connection with, or arising out of, the # 30 | # furnishing, performance, or use of these programs. # 31 | ########################################################################## 32 | -------------------------------------------------------------------------------- /examples/lesson09/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson09/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson09/snippets_ipynb/grades.csv: -------------------------------------------------------------------------------- 1 | 1,Red,A 2 | 2,Green,B 3 | 3,White,A 4 | -------------------------------------------------------------------------------- /examples/lesson09/snippets_ipynb/grades.txt: -------------------------------------------------------------------------------- 1 | 1 Red A 2 | 2 Green B 3 | 3 White A 4 | -------------------------------------------------------------------------------- /examples/lesson09/snippets_py/.ipynb_checkpoints/09_03.01selfcheck-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 9.3.1 Self Check snippets 2 | 3 | # Exercise 3 4 | with open('grades.txt', mode='w') as grades: 5 | grades.write('1 Red A\n') 6 | grades.write('2 Green B\n') 7 | grades.write('3 White A\n') 8 | 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson09/snippets_py/09_03.01selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 9.3.1 Self Check snippets 2 | 3 | # Exercise 3 4 | with open('grades.txt', mode='w') as grades: 5 | grades.write('1 Red A\n') 6 | grades.write('2 Green B\n') 7 | grades.write('3 White A\n') 8 | 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson09/snippets_py/09_11.py: -------------------------------------------------------------------------------- 1 | # Section 9.11 snippets 2 | def function1(): 3 | function2() 4 | 5 | def function2(): 6 | raise Exception('An exception occurred') 7 | 8 | function1() 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson10/card_images/10_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/10_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/10_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/10_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/10_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/10_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/10_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/10_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/2_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/2_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/2_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/2_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/2_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/2_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/2_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/2_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/3_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/3_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/3_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/3_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/3_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/3_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/3_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/3_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/4_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/4_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/4_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/4_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/4_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/4_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/4_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/4_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/5_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/5_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/5_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/5_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/5_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/5_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/5_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/5_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/6_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/6_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/6_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/6_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/6_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/6_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/6_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/6_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/7_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/7_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/7_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/7_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/7_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/7_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/7_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/7_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/8_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/8_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/8_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/8_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/8_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/8_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/8_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/8_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/9_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/9_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/9_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/9_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/9_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/9_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/9_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/9_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/ace_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/ace_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/ace_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/ace_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/ace_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/ace_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/ace_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/ace_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/jack_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/jack_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/jack_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/jack_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/jack_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/jack_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/jack_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/jack_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/king_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/king_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/king_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/king_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/king_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/king_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/king_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/king_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/queen_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/queen_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/queen_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/queen_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/queen_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/queen_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/card_images/queen_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/card_images/queen_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/account.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/account.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/card.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/card.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/carddataclass.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/carddataclass.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/commissionemployee.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/commissionemployee.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/complexnumber.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/complexnumber.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/complexnumber2.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/complexnumber2.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/deck.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/deck.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/deck2.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/deck2.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/private.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/private.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/salariedcommissionemployee.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/salariedcommissionemployee.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/__pycache__/timewithproperties.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/__pycache__/timewithproperties.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/10_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/10_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/10_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/10_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/10_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/10_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/10_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/10_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/2_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/2_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/2_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/2_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/2_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/2_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/2_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/2_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/3_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/3_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/3_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/3_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/3_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/3_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/3_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/3_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/4_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/4_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/4_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/4_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/4_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/4_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/4_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/4_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/5_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/5_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/5_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/5_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/5_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/5_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/5_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/5_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/6_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/6_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/6_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/6_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/6_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/6_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/6_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/6_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/7_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/7_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/7_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/7_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/7_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/7_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/7_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/7_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/8_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/8_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/8_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/8_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/8_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/8_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/8_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/8_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/9_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/9_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/9_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/9_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/9_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/9_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/9_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/9_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/ace_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/ace_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/ace_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/ace_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/ace_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/ace_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/ace_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/ace_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/jack_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/jack_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/jack_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/jack_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/jack_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/jack_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/jack_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/jack_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/king_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/king_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/king_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/king_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/king_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/king_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/king_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/king_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/queen_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/queen_of_clubs.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/queen_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/queen_of_diamonds.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/queen_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/queen_of_hearts.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/card_images/queen_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/card_images/queen_of_spades.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/.ipynb_checkpoints/10_04.03-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 10.4.3 snippets 2 | 3 | # Attributes Are Always Accessible 4 | from timewithproperties import Time 5 | 6 | wake_up = Time(hour=7, minute=45, second=30) 7 | 8 | wake_up._hour 9 | 10 | wake_up._hour = 100 11 | 12 | wake_up 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/.ipynb_checkpoints/10_13.01-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 10.13.1 snippets 2 | 3 | from dataclasses import dataclass 4 | 5 | @dataclass 6 | class Demo: 7 | x # attempting to create a data attribute x 8 | 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/.ipynb_checkpoints/10_15-checkpoint.py: -------------------------------------------------------------------------------- 1 | # Section 10.15 snippets 2 | z = 'global z' 3 | 4 | def print_variables(): 5 | y = 'local y in print_variables' 6 | print(y) 7 | print(z) 8 | 9 | print_variables() 10 | 11 | y 12 | 13 | z 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/10_04.02selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 10.4.2 Self Check snippets 2 | 3 | # Exercise 3 4 | from timewithproperties import Time 5 | 6 | t = Time() 7 | 8 | t 9 | 10 | t.time = (12, 30, 45) 11 | 12 | t 13 | 14 | t.time 15 | 16 | 17 | 18 | 19 | ########################################################################## 20 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 21 | # Pearson Education, Inc. All Rights Reserved. # 22 | # # 23 | # DISCLAIMER: The authors and publisher of this book have used their # 24 | # best efforts in preparing the book. These efforts include the # 25 | # development, research, and testing of the theories and programs # 26 | # to determine their effectiveness. The authors and publisher make # 27 | # no warranty of any kind, expressed or implied, with regard to these # 28 | # programs or to the documentation contained in these books. The authors # 29 | # and publisher shall not be liable in any event for incidental or # 30 | # consequential damages in connection with, or arising out of, the # 31 | # furnishing, performance, or use of these programs. # 32 | ########################################################################## 33 | -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/10_04.03.py: -------------------------------------------------------------------------------- 1 | # Section 10.4.3 snippets 2 | 3 | # Attributes Are Always Accessible 4 | from timewithproperties import Time 5 | 6 | wake_up = Time(hour=7, minute=45, second=30) 7 | 8 | wake_up._hour 9 | 10 | wake_up._hour = 100 11 | 12 | wake_up 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/10_13.01.py: -------------------------------------------------------------------------------- 1 | # Section 10.13.1 snippets 2 | 3 | from dataclasses import dataclass 4 | 5 | @dataclass 6 | class Demo: 7 | x # attempting to create a data attribute x 8 | 9 | 10 | 11 | ########################################################################## 12 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 13 | # Pearson Education, Inc. All Rights Reserved. # 14 | # # 15 | # DISCLAIMER: The authors and publisher of this book have used their # 16 | # best efforts in preparing the book. These efforts include the # 17 | # development, research, and testing of the theories and programs # 18 | # to determine their effectiveness. The authors and publisher make # 19 | # no warranty of any kind, expressed or implied, with regard to these # 20 | # programs or to the documentation contained in these books. The authors # 21 | # and publisher shall not be liable in any event for incidental or # 22 | # consequential damages in connection with, or arising out of, the # 23 | # furnishing, performance, or use of these programs. # 24 | ########################################################################## 25 | -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/10_13.02selfcheck.py: -------------------------------------------------------------------------------- 1 | # Section 10.13.2 Self Check snippets 2 | 3 | # Exercise 1 4 | from carddataclass import Card 5 | 6 | c = Card('Ace', 'Spades') 7 | 8 | c 9 | 10 | type(c.face) 11 | 12 | c.face = 100 13 | 14 | c 15 | 16 | type(c.face) 17 | 18 | 19 | 20 | ########################################################################## 21 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 22 | # Pearson Education, Inc. All Rights Reserved. # 23 | # # 24 | # DISCLAIMER: The authors and publisher of this book have used their # 25 | # best efforts in preparing the book. These efforts include the # 26 | # development, research, and testing of the theories and programs # 27 | # to determine their effectiveness. The authors and publisher make # 28 | # no warranty of any kind, expressed or implied, with regard to these # 29 | # programs or to the documentation contained in these books. The authors # 30 | # and publisher shall not be liable in any event for incidental or # 31 | # consequential damages in connection with, or arising out of, the # 32 | # furnishing, performance, or use of these programs. # 33 | ########################################################################## 34 | -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/10_15.py: -------------------------------------------------------------------------------- 1 | # Section 10.15 snippets 2 | z = 'global z' 3 | 4 | def print_variables(): 5 | y = 'local y in print_variables' 6 | print(y) 7 | print(z) 8 | 9 | print_variables() 10 | 11 | y 12 | 13 | z 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/__pycache__/account.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_py/__pycache__/account.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson10/snippets_py/__pycache__/timewithproperties.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson10/snippets_py/__pycache__/timewithproperties.cpython-37.pyc -------------------------------------------------------------------------------- /examples/lesson11/mask_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/mask_circle.png -------------------------------------------------------------------------------- /examples/lesson11/mask_heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/mask_heart.png -------------------------------------------------------------------------------- /examples/lesson11/mask_oval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/mask_oval.png -------------------------------------------------------------------------------- /examples/lesson11/mask_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/mask_star.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_ipynb/RomeoAndJulietHeart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/snippets_ipynb/RomeoAndJulietHeart.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_ipynb/RomeoAndJulietStar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/snippets_ipynb/RomeoAndJulietStar.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_ipynb/files/art/.ipynb_checkpoints/check-checkpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/snippets_ipynb/files/art/.ipynb_checkpoints/check-checkpoint.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_ipynb/mask_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/snippets_ipynb/mask_circle.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_ipynb/mask_heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/snippets_ipynb/mask_heart.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_ipynb/mask_oval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/snippets_ipynb/mask_oval.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_ipynb/mask_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson11/snippets_ipynb/mask_star.png -------------------------------------------------------------------------------- /examples/lesson11/snippets_py/11_02.10.py: -------------------------------------------------------------------------------- 1 | # Section 11.2.10 snippets 2 | from textblob import Word 3 | 4 | word = Word('varieties') 5 | 6 | word.stem() 7 | 8 | word.lemmatize() 9 | 10 | 11 | 12 | ########################################################################## 13 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 14 | # Pearson Education, Inc. All Rights Reserved. # 15 | # # 16 | # DISCLAIMER: The authors and publisher of this book have used their # 17 | # best efforts in preparing the book. These efforts include the # 18 | # development, research, and testing of the theories and programs # 19 | # to determine their effectiveness. The authors and publisher make # 20 | # no warranty of any kind, expressed or implied, with regard to these # 21 | # programs or to the documentation contained in these books. The authors # 22 | # and publisher shall not be liable in any event for incidental or # 23 | # consequential damages in connection with, or arising out of, the # 24 | # furnishing, performance, or use of these programs. # 25 | ########################################################################## 26 | -------------------------------------------------------------------------------- /examples/lesson11/snippets_py/11_02.14.py: -------------------------------------------------------------------------------- 1 | # Section 11.2.14 snippets 2 | from textblob import TextBlob 3 | 4 | text = 'Today is a beautiful day. Tomorrow looks like bad weather.' 5 | 6 | blob = TextBlob(text) 7 | 8 | blob.ngrams() 9 | 10 | blob.ngrams(n=5) 11 | 12 | 13 | 14 | ########################################################################## 15 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 16 | # Pearson Education, Inc. All Rights Reserved. # 17 | # # 18 | # DISCLAIMER: The authors and publisher of this book have used their # 19 | # best efforts in preparing the book. These efforts include the # 20 | # development, research, and testing of the theories and programs # 21 | # to determine their effectiveness. The authors and publisher make # 22 | # no warranty of any kind, expressed or implied, with regard to these # 23 | # programs or to the documentation contained in these books. The authors # 24 | # and publisher shall not be liable in any event for incidental or # 25 | # consequential damages in connection with, or arising out of, the # 26 | # furnishing, performance, or use of these programs. # 27 | ########################################################################## 28 | -------------------------------------------------------------------------------- /examples/lesson12/_READ_ME_FIRST: -------------------------------------------------------------------------------- 1 | **Upgrading from Twitter v1.1 to Twitter v2** 2 | On August 18, 2022, we discovered that new Twitter developer accounts cannot access the Twitter version 1.1 APIs on which we based Lesson 12, Data Mining Twitter, and two case studies in Lesson 16, Big Data: Hadoop, Spark, NoSQL and IoT. 3 | 4 | Twitter users who already had Twitter developer accounts can still access the Twitter version 1.1 APIs, but viewers will not fall into this category. 5 | 6 | We’re updating Lesson 12 and the two case studies in Lesson 16 to the Twitter version 2 APIs. We anticipate this could take two to four weeks as we: 7 | 1. master the new Twitter v2 APIs, 8 | 2. update our Lesson 12 and 16 code examples, and 9 | 3. update the source-code files and Jupyter Notebooks in this repository. 10 | 11 | Once completed, we’ll: 12 | • rerecord Lesson 12 and the relevant sections of Lesson 16, 13 | • post an updated version of Chapter 12 and the relevant sections of Chapter 16 to the book’s webpages at https://informit.com and https://deitel.com, 14 | • post updated files to this GitHub repository. 15 | 16 | If you have any questions, please email paul@deitel.com. 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/lesson12/keys.py: -------------------------------------------------------------------------------- 1 | consumer_key = 'YourConsumerKey' 2 | consumer_secret = 'YourConsumerSecret' 3 | access_token = 'YourAccessToken' 4 | access_token_secret = 'YourAccessTokenSecret' 5 | 6 | mapquest_key = 'YourAPIKey' -------------------------------------------------------------------------------- /examples/lesson12/snippets_ipynb/README.txt: -------------------------------------------------------------------------------- 1 | Sections 18.7-11 use one continuous IPython session for the examples 2 | and Self Check exercises, so all of these are in one notebook. 3 | -------------------------------------------------------------------------------- /examples/lesson12/snippets_ipynb/files/art/.ipynb_checkpoints/check-checkpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson12/snippets_ipynb/files/art/.ipynb_checkpoints/check-checkpoint.png -------------------------------------------------------------------------------- /examples/lesson12/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson12/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson12/snippets_ipynb/keys.py: -------------------------------------------------------------------------------- 1 | consumer_key = 'YourConsumerKey' 2 | consumer_secret = 'YourConsumerSecret' 3 | access_token = 'YourAccessToken' 4 | access_token_secret = 'YourAccessTokenSecret' 5 | 6 | mapquest_key = 'YourAPIKey' -------------------------------------------------------------------------------- /examples/lesson12/snippets_py/12_12.py: -------------------------------------------------------------------------------- 1 | # Section 12.12 snippets 2 | 3 | import preprocessor as p 4 | 5 | p.set_options(p.OPT.URL, p.OPT.RESERVED) 6 | 7 | tweet_text = 'RT A sample retweet with a URL https://nasa.gov' 8 | 9 | p.clean(tweet_text) 10 | 11 | 12 | 13 | 14 | 15 | ########################################################################## 16 | # (C) Copyright 2019 by Deitel & Associates, Inc. and # 17 | # Pearson Education, Inc. All Rights Reserved. # 18 | # # 19 | # DISCLAIMER: The authors and publisher of this book have used their # 20 | # best efforts in preparing the book. These efforts include the # 21 | # development, research, and testing of the theories and programs # 22 | # to determine their effectiveness. The authors and publisher make # 23 | # no warranty of any kind, expressed or implied, with regard to these # 24 | # programs or to the documentation contained in these books. The authors # 25 | # and publisher shall not be liable in any event for incidental or # 26 | # consequential damages in connection with, or arising out of, the # 27 | # furnishing, performance, or use of these programs. # 28 | ########################################################################## 29 | -------------------------------------------------------------------------------- /examples/lesson12/snippets_py/keys.py: -------------------------------------------------------------------------------- 1 | consumer_key = 'YourConsumerKey' 2 | consumer_secret = 'YourConsumerSecret' 3 | access_token = 'YourAccessToken' 4 | access_token_secret = 'YourAccessTokenSecret' 5 | 6 | mapquest_key = 'YourAPIKey' -------------------------------------------------------------------------------- /examples/lesson13/SpokenResponse.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson13/SpokenResponse.wav -------------------------------------------------------------------------------- /examples/lesson13/keys.py: -------------------------------------------------------------------------------- 1 | speech_to_text_key = '' 2 | text_to_speech_key = '' 3 | translate_key = '' -------------------------------------------------------------------------------- /examples/lesson14/images/.ipynb_checkpoints/IntroToPythonCover-checkpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/.ipynb_checkpoints/IntroToPythonCover-checkpoint.png -------------------------------------------------------------------------------- /examples/lesson14/images/.ipynb_checkpoints/PyFPCover-checkpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/.ipynb_checkpoints/PyFPCover-checkpoint.png -------------------------------------------------------------------------------- /examples/lesson14/images/.ipynb_checkpoints/PythonFundamentalsLiveLessons-checkpoint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/.ipynb_checkpoints/PythonFundamentalsLiveLessons-checkpoint.jpg -------------------------------------------------------------------------------- /examples/lesson14/images/.ipynb_checkpoints/course_image-checkpoint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/.ipynb_checkpoints/course_image-checkpoint.jpg -------------------------------------------------------------------------------- /examples/lesson14/images/IntroToPythonCover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/IntroToPythonCover.png -------------------------------------------------------------------------------- /examples/lesson14/images/IntroToPythonTOC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/IntroToPythonTOC.png -------------------------------------------------------------------------------- /examples/lesson14/images/PyFPCover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/PyFPCover.png -------------------------------------------------------------------------------- /examples/lesson14/images/PythonFundamentalsLiveLessons.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/PythonFundamentalsLiveLessons.jpg -------------------------------------------------------------------------------- /examples/lesson14/images/course_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/images/course_image.jpg -------------------------------------------------------------------------------- /examples/lesson14/snippets_ipynb/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson14/snippets_ipynb/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson15/images/.ipynb_checkpoints/IntroToPythonCover-checkpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/.ipynb_checkpoints/IntroToPythonCover-checkpoint.png -------------------------------------------------------------------------------- /examples/lesson15/images/.ipynb_checkpoints/PyFPCover-checkpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/.ipynb_checkpoints/PyFPCover-checkpoint.png -------------------------------------------------------------------------------- /examples/lesson15/images/.ipynb_checkpoints/PythonFundamentalsLiveLessons-checkpoint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/.ipynb_checkpoints/PythonFundamentalsLiveLessons-checkpoint.jpg -------------------------------------------------------------------------------- /examples/lesson15/images/.ipynb_checkpoints/course_image-checkpoint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/.ipynb_checkpoints/course_image-checkpoint.jpg -------------------------------------------------------------------------------- /examples/lesson15/images/IntroToPythonCover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/IntroToPythonCover.png -------------------------------------------------------------------------------- /examples/lesson15/images/IntroToPythonTOC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/IntroToPythonTOC.png -------------------------------------------------------------------------------- /examples/lesson15/images/PyFPCover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/PyFPCover.png -------------------------------------------------------------------------------- /examples/lesson15/images/PythonFundamentalsLiveLessons.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/PythonFundamentalsLiveLessons.jpg -------------------------------------------------------------------------------- /examples/lesson15/images/course_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson15/images/course_image.jpg -------------------------------------------------------------------------------- /examples/lesson16/HadoopMapReduce/yarn.txt: -------------------------------------------------------------------------------- 1 | yarn jar /usr/hdp/current/hadoop-mapreduce-client/hadoop-streaming.jar -D mapred.output.key.comparator.class=org.apache.hadoop.mapred.lib.KeyFieldBasedComparator -D mapred.text.key.comparator.options=-n -files length_mapper.py,length_reducer.py -mapper length_mapper.py -reducer length_reducer.py -input /example/data/RomeoAndJuliet.txt -output /example/wordlengthsoutput -------------------------------------------------------------------------------- /examples/lesson16/README.txt: -------------------------------------------------------------------------------- 1 | Unlike the prior chapters, any snippet files and notebook files 2 | are located in the example folders mentioned in each section. 3 | 4 | Some examples were implemented only in notebooks because they 5 | execute in cloud-based cluster environments. 6 | -------------------------------------------------------------------------------- /examples/lesson16/SparkHashtagSummarizer/keys.py: -------------------------------------------------------------------------------- 1 | consumer_key = 'YourConsumerKey' 2 | consumer_secret = 'YourConsumerSecret' 3 | access_token = 'YourAccessToken' 4 | access_token_secret = 'YourAccessTokenSecret' 5 | 6 | mapquest_key = 'YourAPIKey' -------------------------------------------------------------------------------- /examples/lesson16/TwitterMongoDB/files/art/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson16/TwitterMongoDB/files/art/check.png -------------------------------------------------------------------------------- /examples/lesson16/TwitterMongoDB/keys.py: -------------------------------------------------------------------------------- 1 | consumer_key = 'YourConsumerKey' 2 | consumer_secret = 'YourConsumerSecret' 3 | access_token = 'YourAccessToken' 4 | access_token_secret = 'YourAccessTokenSecret' 5 | 6 | mapquest_key = 'YourAPIKey' 7 | 8 | mongo_connection_string = 'YourMongoConnectionString' 9 | -------------------------------------------------------------------------------- /examples/lesson16/TwitterMongoDB/state_codes.py: -------------------------------------------------------------------------------- 1 | state_codes = { 2 | 'AL': 'Alabama', 3 | 'AK': 'Alaska', 4 | 'AZ': 'Arizona', 5 | 'AR': 'Arkansas', 6 | 'CA': 'California', 7 | 'CO': 'Colorado', 8 | 'CT': 'Connecticut', 9 | 'DE': 'Delaware', 10 | 'FL': 'Florida', 11 | 'GA': 'Georgia', 12 | 'HI': 'Hawaii', 13 | 'ID': 'Idaho', 14 | 'IL': 'Illinois', 15 | 'IN': 'Indiana', 16 | 'IA': 'Iowa', 17 | 'KS': 'Kansas', 18 | 'KY': 'Kentucky', 19 | 'LA': 'Louisiana', 20 | 'ME': 'Maine', 21 | 'MD': 'Maryland', 22 | 'MA': 'Massachusetts', 23 | 'MI': 'Michigan', 24 | 'MN': 'Minnesota', 25 | 'MS': 'Mississippi', 26 | 'MO': 'Missouri', 27 | 'MT': 'Montana', 28 | 'NE': 'Nebraska', 29 | 'NV': 'Nevada', 30 | 'NH': 'New Hampshire', 31 | 'NJ': 'New Jersey', 32 | 'NM': 'New Mexico', 33 | 'NY': 'New York', 34 | 'NC': 'North Carolina', 35 | 'ND': 'North Dakota', 36 | 'OH': 'Ohio', 37 | 'OK': 'Oklahoma', 38 | 'OR': 'Oregon', 39 | 'PA': 'Pennsylvania', 40 | 'RI': 'Rhode Island', 41 | 'SC': 'South Carolina', 42 | 'SD': 'South Dakota', 43 | 'TN': 'Tennessee', 44 | 'TX': 'Texas', 45 | 'UT': 'Utah', 46 | 'VT': 'Vermont', 47 | 'VA': 'Virginia', 48 | 'WA': 'Washington State', 49 | 'WV': 'West Virginia', 50 | 'WI': 'Wisconsin', 51 | 'WY': 'Wyoming' 52 | } -------------------------------------------------------------------------------- /examples/lesson16/sql/books.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdeitel/PythonFundamentalsLiveLessons/f5eebab5cbfaee77883f58fda62b355ede91db2f/examples/lesson16/sql/books.db --------------------------------------------------------------------------------