├── .gitignore
├── Lectures
├── 01 Introduction
│ ├── 01 Early Programming.ipynb
│ ├── 02 Programming Languages.ipynb
│ ├── 03 Why Choose Python.ipynb
│ ├── 04 Python Features and Applications.ipynb
│ ├── 05 How Long Does it Take to Learn Python.ipynb
│ ├── 06 Python Versions.ipynb
│ ├── 07 Effective Question Asking.ipynb
│ └── images
│ │ ├── assembly.jpeg
│ │ ├── banner.png
│ │ ├── consistency-vs-motivation.jpg
│ │ ├── dont-do-this.png
│ │ ├── how-to-ask
│ │ ├── dont-ask-to-ask.png
│ │ ├── no-hello.png
│ │ └── xy-problem.png
│ │ ├── languages-types.png
│ │ ├── learning-programming-tips.png
│ │ ├── programming-languages-timeline.webp
│ │ ├── programming-languages.png
│ │ ├── python-calling-cpp.png
│ │ ├── python-ml.png
│ │ ├── python-pypi.png
│ │ ├── python-scientific-computing.jpg
│ │ ├── python-versions-timeline.jpg
│ │ ├── python-vs-c-memory-management.png
│ │ ├── python-vs-c-typing.png
│ │ ├── python-vs-java-hello-world.png
│ │ ├── python-vs-java-read-file.jpeg
│ │ ├── python-vs-java-read-file.png
│ │ ├── python-web-frameworks.png
│ │ └── try-this.png
├── 02 Python Setup
│ ├── 01 Introduction to Python Development Environment.ipynb
│ ├── 02 Operating Systems and Terminal Setup.ipynb
│ ├── 03 How the File System Works in Unix-Based Systems.ipynb
│ ├── 04 Command-Line Crash Course.ipynb
│ ├── 05 Installing VS Code.ipynb
│ ├── 06 Getting Started with Visual Studio Code.ipynb
│ ├── 07 What is a Package Manager.ipynb
│ ├── 08 Installing Conda.ipynb
│ ├── 09 Python Package Management System.ipynb
│ ├── 10 Managing Python Packages with Conda.ipynb
│ ├── 11 Using Conda Environments in VS Code.ipynb
│ ├── 12 Setting Up Jupyter Notebook with Conda.ipynb
│ └── images
│ │ ├── 00-conda-download-mac.png
│ │ ├── 00-conda-download.png
│ │ ├── 01-conda-install-start-mac.png
│ │ ├── 01-conda-install-start.png
│ │ ├── 02-conda-license-skip.png
│ │ ├── 03-conda-license.png
│ │ ├── 04-conda-installation-path.png
│ │ ├── 05-init-conda.png
│ │ ├── 06-conda-setup-finished.png
│ │ ├── 07-conda-version.png
│ │ ├── 1-show-python-interpreter-list.png
│ │ ├── 1-vscode-jupyter-select-kernel.png
│ │ ├── 2-select-python-interpreter.png
│ │ ├── 2-vscode-jupyter-select-env.png
│ │ ├── 3-vscode-jupyter-env-list.png
│ │ ├── 4-vscode-jupyter-run-code.png
│ │ ├── banner.png
│ │ ├── conda-activate.png
│ │ ├── conda-environments.png
│ │ ├── conda-miniconda-anaconda.png
│ │ ├── conda-pip.png
│ │ ├── conda-python.jpg
│ │ ├── how-conda-works.png
│ │ ├── jupyter-notebook.png
│ │ ├── jupyterlab.png
│ │ ├── notebook-vscode.png
│ │ ├── os-mac.jpg
│ │ ├── os-ubuntu.webp
│ │ ├── os-wsl.webp
│ │ ├── pip.webp
│ │ ├── pypi-pip.png
│ │ ├── python-ecosystem.png
│ │ ├── python-vscode.png
│ │ ├── terminal-mac.png
│ │ ├── terminal-ubuntu.png
│ │ ├── terminal-wsl.png
│ │ ├── unix-file-system.png
│ │ ├── vscode-install-linux.webp
│ │ ├── vscode-install-path-mac.png
│ │ ├── vscode-install-wsl.png
│ │ ├── vscode-jupyter-ext.png
│ │ ├── vscode-python-ext.png
│ │ ├── vscode-terminal-env.png
│ │ ├── windows-os.webp
│ │ ├── wsl-starting-notification.png
│ │ └── wsl-statusbar-indicator.png
├── 03 Getting Started
│ ├── 01 How to Download Source Code.ipynb
│ └── images
│ │ ├── banner.png
│ │ └── download-source-code.png
├── 04 Data Types
│ ├── 01 Basic Data Types.ipynb
│ ├── 02 Variables.ipynb
│ ├── 03 Conversion Between Data Types.ipynb
│ ├── 04 Operators and Expresssions.ipynb
│ ├── 05 Objects in Python.ipynb
│ ├── 06 Strings.ipynb
│ ├── 07 Basic String Operations.ipynb
│ ├── 08 String Methods.ipynb
│ ├── 09 Basics of Input and Output.ipynb
│ ├── 10 String Formatting.ipynb
│ ├── 11 Escape Sequences and Raw Strings.ipynb
│ ├── 12 Composite Data Types.ipynb
│ ├── 13 Lists.ipynb
│ ├── 14 Accessing and Modifying List Elements.ipynb
│ ├── 15 Common List Operations.ipynb
│ ├── 16 Tuples.ipynb
│ ├── 17 Dictionary.ipynb
│ ├── 18 Accessing and Modifying Dictionary.ipynb
│ ├── 19 Dictionary Manipulation and Practical Uses.ipynb
│ ├── 20 Sets.ipynb
│ ├── 21 Set Operations.ipynb
│ ├── 22 Frozensets.ipynb
│ ├── 23 Packing and Unpacking.ipynb
│ └── images
│ │ ├── banner.png
│ │ ├── composite-data-types-banner.png
│ │ ├── composite-data-types.png
│ │ ├── dict.png
│ │ ├── frozenset.png
│ │ ├── list-indexing.png
│ │ ├── list.png
│ │ ├── object-audio-player-operations.png
│ │ ├── object-audio-player.png
│ │ ├── object-identity
│ │ ├── 1.png
│ │ ├── 2.png
│ │ ├── 3.png
│ │ └── 4.png
│ │ ├── set-operations.png
│ │ ├── set.png
│ │ ├── string-indexing.png
│ │ ├── string-neg-indexing.png
│ │ ├── string.png
│ │ ├── tom-jerry-2.avif
│ │ ├── tom-jerry-nibbles-tweety-spike-gpt.png
│ │ ├── tom-jerry-spike.jpeg
│ │ ├── tom-jerry-tweety.jpeg
│ │ ├── tuple.png
│ │ └── variables.webp
├── 05 Code Structure and Syntax
│ ├── 01 Introduction.ipynb
│ ├── 02 Line Continuation.ipynb
│ ├── 03 Comments.ipynb
│ ├── 04 Whitespace and Indentation.ipynb
│ └── images
│ │ ├── banner.png
│ │ ├── python-coding-syntax.jpeg
│ │ └── python-indentation.png
├── 06 Control Structures
│ ├── 01 Introduction to Control Structures.ipynb
│ ├── 02 Conditional Statements.ipynb
│ ├── 03 for Loops.ipynb
│ ├── 04 while Loops.ipynb
│ ├── 05 Loop Control Statements.ipynb
│ ├── 06 Comprehensions.ipynb
│ └── images
│ │ ├── banner.png
│ │ └── if-condition.png
├── 07 Functions
│ ├── 01 Introduction to Functions.ipynb
│ ├── 02 Defining and Calling Functions.ipynb
│ ├── 03 Argument Passing.ipynb
│ ├── 04 Function Return Values.ipynb
│ ├── 05 Variable-Length Argument.ipynb
│ ├── 06 Function Documentation.ipynb
│ ├── 07 Lambda Functions.ipynb
│ ├── 08 Built-in Functions.ipynb
│ └── images
│ │ ├── banner.png
│ │ ├── dry.png
│ │ ├── function-output.png
│ │ ├── function-parts.png
│ │ ├── math-function-input-output.png
│ │ ├── math-function.png
│ │ ├── not-function-output.png
│ │ ├── parameters-arguments.png
│ │ ├── puppet-func.png
│ │ └── vending-function.png
├── 08 File Handling
│ ├── 01 Introduction to File Handling.ipynb
│ ├── 02 Reading from Files.ipynb
│ ├── 03 Writing to Files.ipynb
│ ├── files
│ │ ├── Notes_Report.txt
│ │ ├── buffered.txt
│ │ ├── example.txt
│ │ ├── image.png
│ │ ├── important.txt
│ │ ├── monthly_sales_report.txt
│ │ ├── mynotes.txt
│ │ ├── notes_log.txt
│ │ ├── output.jpg
│ │ ├── output.txt
│ │ └── write-example.txt
│ └── images
│ │ ├── banner.png
│ │ ├── encode-decode.png
│ │ └── file-path-windows-linux.png
├── 09 Object Oriented Programming
│ ├── 01 Programming Paradigms.ipynb
│ ├── 02 Introduction to Object Oriented Programming.ipynb
│ ├── 03 OOP in Python.ipynb
│ ├── 04 Classes and Objects.ipynb
│ ├── 05 the __init__ Method.ipynb
│ ├── 06 OOP Feature: Inheritance.ipynb
│ ├── 07 Types of Inheritance.ipynb
│ ├── 08 Object Relationships.ipynb
│ ├── 09 OOP Feature: Polymorphism.ipynb
│ ├── 10 OOP Feature: Encapsulation.ipynb
│ ├── 11 OOP Feature: Abstract Base Classes.ipynb
│ ├── 12 Overriding.ipynb
│ ├── 13 The Magic Methods.ipynb
│ ├── 14 Static and Class Methods.ipynb
│ └── images
│ │ ├── access-modification-python.png
│ │ ├── aggregation.png
│ │ ├── association.png
│ │ ├── banner.png
│ │ ├── class-objects.png
│ │ ├── composition.png
│ │ ├── cookie-cutter.webp
│ │ ├── declarative-paradigm.png
│ │ ├── doctor.png
│ │ ├── hierarchical-inheritance.png
│ │ ├── how-what.webp
│ │ ├── hybrid-inheritance.png
│ │ ├── imperative-declarative.gif
│ │ ├── imperative-paradigm.png
│ │ ├── inheritance-types.png
│ │ ├── inheritance.png
│ │ ├── multi-level-inheritance.png
│ │ ├── multiple-inheritance.png
│ │ ├── object-relationships.png
│ │ ├── object.png
│ │ ├── oop-abstraction.png
│ │ ├── oop-encapsulation.png
│ │ ├── oop-inheritance.png
│ │ ├── oop-polymorphism.png
│ │ ├── programming-paradigms.png
│ │ ├── single-inheritance.png
│ │ └── sql-query.png
├── 10 Modular Programming
│ ├── 01 Limitations of Jupyter Notebooks.ipynb
│ ├── 02 Modular Programming.ipynb
│ ├── 03 Creating and Importing Modules.ipynb
│ ├── 04 The Python Module Search Path.ipynb
│ ├── 05 Creating and Using Packages.ipynb
│ ├── 06 Common Issues in Python Packages.ipynb
│ ├── 07 Basics of Debugging in VSCode.ipynb
│ ├── 08 Advanced Debugging Techniques in VSCode.ipynb
│ ├── 09 Exception Handling.ipynb
│ └── images
│ │ ├── add-config.gif
│ │ ├── banner.png
│ │ ├── bpts-in-overview.png
│ │ ├── breakpoints.png
│ │ ├── core-module.png
│ │ ├── debug-environments.png
│ │ ├── debug-start.png
│ │ ├── debugging_hero.png
│ │ ├── launch-configuration.png
│ │ ├── launch-json-suggestions.png
│ │ ├── log-points.gif
│ │ ├── modular-notebook.png
│ │ ├── modules-type.png
│ │ ├── run.png
│ │ ├── toolbar.png
│ │ ├── variables.png
│ │ ├── vscode-debugger.png
│ │ └── watch.png
├── 11 Capstone Project
│ ├── 01 Project Proposal.ipynb
│ ├── 02 Requirements Gathering.ipynb
│ ├── 03 Design and Planning.ipynb
│ ├── 04 Setting Up the Development Environment.ipynb
│ ├── 05 Modular Design and Code Organization.ipynb
│ ├── 06 Coding and Implementation.ipynb
│ ├── 07 Testing and Debugging.ipynb
│ ├── 08 Dcoumentation and User Guide.ipynb
│ ├── 09 Conclusion.ipynb
│ └── 10 Course Wrap-up.ipynb
├── 12 Advanced Topics
│ ├── -- Advanced Composite Data Types.ipynb
│ ├── -- Bitwise Operators.ipynb
│ ├── 01 List Memory Management.ipynb
│ ├── 02 Dictionary and Set Hash Table.ipynb
│ ├── 02 Grouping Statements.ipynb
│ ├── 03 Function Arguments.ipynb
│ ├── 03 Variable-length Arguments (*args and **kwargs).ipynb
│ ├── 04 Function Parameters.ipynb
│ ├── 04 Namespaces in Python.ipynb
│ ├── 05 Function Return Values.ipynb
│ ├── 05 Variable Scope.ipynb
│ ├── 06 Namespace Dictionaries.ipynb
│ ├── 07 Error and Exception Handling.ipynb
│ ├── 07 Modify Variables Out of Scope.ipynb
│ ├── 08 Recursion.ipynb
│ ├── 09 The with Statement and Context Managers.ipynb
│ ├── 10 Dependency Management.ipynb
│ ├── 13 Error Handling with try and Except.ipynb
│ ├── 23 Converting Between Composite Data Types.ipynb
│ ├── 24 Copying Composite Data Types.ipynb
│ ├── 25 Basic OOP Concepts.ipynb
│ └── 26 Custom Data Types using Classes.ipynb
└── images
│ └── exercise-banner.gif
├── README.md
├── images
├── banner.png
├── logo.webp
└── pytopia-course.png
└── test.py
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | share/python-wheels/
24 | *.egg-info/
25 | .installed.cfg
26 | *.egg
27 | MANIFEST
28 |
29 | # PyInstaller
30 | # Usually these files are written by a python script from a template
31 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
32 | *.manifest
33 | *.spec
34 |
35 | # Installer logs
36 | pip-log.txt
37 | pip-delete-this-directory.txt
38 |
39 | # Unit test / coverage reports
40 | htmlcov/
41 | .tox/
42 | .nox/
43 | .coverage
44 | .coverage.*
45 | .cache
46 | nosetests.xml
47 | coverage.xml
48 | *.cover
49 | *.py,cover
50 | .hypothesis/
51 | .pytest_cache/
52 | cover/
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | .pybuilder/
76 | target/
77 |
78 | # Jupyter Notebook
79 | .ipynb_checkpoints
80 |
81 | # IPython
82 | profile_default/
83 | ipython_config.py
84 |
85 | # pyenv
86 | # For a library or package, you might want to ignore these files since the code is
87 | # intended to run in multiple environments; otherwise, check them in:
88 | # .python-version
89 |
90 | # pipenv
91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
94 | # install all needed dependencies.
95 | #Pipfile.lock
96 |
97 | # poetry
98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99 | # This is especially recommended for binary packages to ensure reproducibility, and is more
100 | # commonly ignored for libraries.
101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102 | #poetry.lock
103 |
104 | # pdm
105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106 | #pdm.lock
107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108 | # in version control.
109 | # https://pdm.fming.dev/#use-with-ide
110 | .pdm.toml
111 |
112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113 | __pypackages__/
114 |
115 | # Celery stuff
116 | celerybeat-schedule
117 | celerybeat.pid
118 |
119 | # SageMath parsed files
120 | *.sage.py
121 |
122 | # Environments
123 | .env
124 | .venv
125 | env/
126 | venv/
127 | ENV/
128 | env.bak/
129 | venv.bak/
130 |
131 | # Spyder project settings
132 | .spyderproject
133 | .spyproject
134 |
135 | # Rope project settings
136 | .ropeproject
137 |
138 | # mkdocs documentation
139 | /site
140 |
141 | # mypy
142 | .mypy_cache/
143 | .dmypy.json
144 | dmypy.json
145 |
146 | # Pyre type checker
147 | .pyre/
148 |
149 | # pytype static type analyzer
150 | .pytype/
151 |
152 | # Cython debug symbols
153 | cython_debug/
154 |
155 | # PyCharm
156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158 | # and can be added to the global gitignore or merged into this file. For a more nuclear
159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160 | #.idea/
161 | .DS_Store
162 |
163 | test.ipynb
164 |
--------------------------------------------------------------------------------
/Lectures/01 Introduction/01 Early Programming.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "attachments": {},
13 | "cell_type": "markdown",
14 | "metadata": {},
15 | "source": [
16 | "# Early Programming\n"
17 | ]
18 | },
19 | {
20 | "cell_type": "markdown",
21 | "metadata": {},
22 | "source": [
23 | "Programming languages are the means by which humans communicate instructions to computers. They serve as the foundation for writing software and creating applications that can perform a wide range of tasks. Each programming language has its own unique syntax, rules, and capabilities, making it suitable for specific purposes.\n"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {},
29 | "source": [
30 | "In the world of technology and computer science, understanding the origins of programming is essential to grasp the foundations of this ever-evolving field. Programming, at its core, is the art of giving instructions to a computer, enabling it to perform specific tasks and solve complex problems. To truly appreciate the programming languages and tools we have today, it is crucial to explore the early stages of programming and the first programming languages that laid the groundwork for what we now take for granted."
31 | ]
32 | },
33 | {
34 | "attachments": {},
35 | "cell_type": "markdown",
36 | "metadata": {},
37 | "source": [
38 | "Watch this episode of the Computer Science Crash Course YouTube playlist for an insightful exploration into the pioneers and milestones that shaped the field. Discover the foundations behind the programming languages we use today:"
39 | ]
40 | },
41 | {
42 | "attachments": {},
43 | "cell_type": "markdown",
44 | "metadata": {},
45 | "source": [
46 | "> 🔫 Watch [Instagram Video on Compiler](https://www.instagram.com/reel/CqdVl_6jtsf/?igshid=MzRlODBiNWFlZA==)"
47 | ]
48 | },
49 | {
50 | "cell_type": "markdown",
51 | "metadata": {},
52 | "source": [
53 | "
Watch [Early Programming](https://www.youtube.com/watch?v=nwDq4adJwzM&list=PL8dPuuaLjXtNlUrzyH5r6jN9ulIgZBpdo&index=11)\n",
54 | "\n",
55 | "\n",
56 | "💡 Summary\n",
57 | "- Early computers relied on plug boards and physical wiring, making programming complex and time-consuming.\n",
58 | "- Punch cards were used to input and output data in early computers.\n",
59 | "- The development of electronic memory in the late 1940s and 1950s led to stored-program computers and the von Neumann architecture.\n",
60 | "- Punch cards were commonly used to load programming data into computers until electronic memory became feasible.\n",
61 | "- Panel programming, which involved switches and control panels, was another method used for programming early computers.\n",
62 | "- Early home computers, like the Altair 8800, relied on switches for programming.\n",
63 | "- Programming languages emerged as a simpler way to write programs, marking a significant advancement in computer programming.\n",
64 | "- The passage emphasizes the complexity and expertise required for early computer programming.\n",
65 | "- Punch cards and punched paper tape were important data storage methods in the early days of computing.\n",
66 | "- The passage hints at more advanced data storage technologies like hard drives, CDs, DVDs, and USB thumb drives.\n",
67 | "- The next episode will delve into programming languages and their role in simplifying the programming process.\n"
68 | ]
69 | },
70 | {
71 | "cell_type": "markdown",
72 | "metadata": {},
73 | "source": []
74 | }
75 | ],
76 | "metadata": {
77 | "language_info": {
78 | "name": "python"
79 | },
80 | "orig_nbformat": 4
81 | },
82 | "nbformat": 4,
83 | "nbformat_minor": 2
84 | }
85 |
--------------------------------------------------------------------------------
/Lectures/01 Introduction/02 Programming Languages.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "attachments": {},
13 | "cell_type": "markdown",
14 | "metadata": {},
15 | "source": [
16 | "# Programming Languages\n"
17 | ]
18 | },
19 | {
20 | "attachments": {},
21 | "cell_type": "markdown",
22 | "metadata": {},
23 | "source": [
24 | "The world of programming languages has evolved significantly since the birth of computing. In this introduction, we will embark on a journey through the timeline of programming languages, exploring their earliest origins and highlighting key milestones along the way. Starting in the 1950s, with languages like Fortran and LISP, which paved the way for scientific and artificial intelligence programming, we'll witness the emergence of influential languages such as COBOL, BASIC, and C in the following decades. As we progress through the years, we'll encounter the advent of object-oriented programming with languages like C++ and Java, and witness the rise of modern web development with scripting languages like JavaScript and Python. Join us as we unravel the fascinating history of programming languages."
25 | ]
26 | },
27 | {
28 | "attachments": {},
29 | "cell_type": "markdown",
30 | "metadata": {},
31 | "source": [
32 | "**Table of contents** \n",
33 | "- [The First Programming Languages](#toc1_) \n",
34 | "- [Types of Programming Languages](#toc2_) \n",
35 | "- [Strengths and Applications](#toc3_) \n",
36 | "- [Considerations for Choosing a Programming Language](#toc4_) \n",
37 | "- [Learning a Programming Language](#toc5_) \n",
38 | "- [The Evolution of Programming Languages](#toc6_) \n",
39 | "\n",
40 | "\n",
47 | ""
48 | ]
49 | },
50 | {
51 | "attachments": {},
52 | "cell_type": "markdown",
53 | "metadata": {},
54 | "source": [
55 | "## [The First Programming Languages](#toc0_)"
56 | ]
57 | },
58 | {
59 | "attachments": {},
60 | "cell_type": "markdown",
61 | "metadata": {},
62 | "source": [
63 | "\n",
64 | "Here is a timeline showcasing the development of some notable programming languages over the years:\n"
65 | ]
66 | },
67 | {
68 | "attachments": {},
69 | "cell_type": "markdown",
70 | "metadata": {},
71 | "source": [
72 | "
Watch [The First Programming Languages](https://www.youtube.com/watch?v=RU1u-js7db8&list=PL8dPuuaLjXtNlUrzyH5r6jN9ulIgZBpdo&index=12)\n",
73 | "\n",
74 | "\n",
75 | "💡 Summary\n",
76 | "- The video discusses the concept of software and its significance in computer programming.\n",
77 | "- It explains machine code and assembly languages as low-level programming languages closely tied to hardware.\n",
78 | "- The role of assemblers in converting assembly instructions into machine code is described.\n",
79 | "- Grace Hopper's contribution to high-level programming languages and the development of the first compiler, A-0, are mentioned.\n",
80 | "- The emergence of FORTRAN as a popular high-level programming language and its impact on simplifying programming is highlighted.\n",
81 | "- The formation of the Committee on Data Systems Languages and the creation of COBOL as a standardized language for different computers are emphasized.\n",
82 | "- The idea of \"write once, run anywhere\" in programming languages is explained.\n",
83 | "- The passage provides an overview of the evolution of programming languages, including ALGOL, LISP, and modern languages like Python and Swift.\n",
84 | "- The potential future of programming languages, such as the use of natural language, is discussed.\n",
85 | "- The importance of programming languages in enabling people from various fields to incorporate computation into their work is underscored.\n"
86 | ]
87 | },
88 | {
89 | "attachments": {},
90 | "cell_type": "markdown",
91 | "metadata": {},
92 | "source": [
93 | "
"
94 | ]
95 | },
96 | {
97 | "attachments": {},
98 | "cell_type": "markdown",
99 | "metadata": {},
100 | "source": [
101 | "Please note that the timeline of programming languages provided in the table is not exhaustive and only showcases a selection of notable languages throughout history."
102 | ]
103 | },
104 | {
105 | "attachments": {},
106 | "cell_type": "markdown",
107 | "metadata": {},
108 | "source": [
109 | "
Watch [Most Popular Programming Languages 1965 - 2022](https://www.youtube.com/watch?v=qQXXI5QFUfw&t=8s)"
110 | ]
111 | },
112 | {
113 | "attachments": {},
114 | "cell_type": "markdown",
115 | "metadata": {},
116 | "source": [
117 | "## [Types of Programming Languages](#toc0_)\n"
118 | ]
119 | },
120 | {
121 | "attachments": {},
122 | "cell_type": "markdown",
123 | "metadata": {},
124 | "source": [
125 | "Programming languages can be categorized into various types, including high-level languages, low-level languages, scripting languages, and domain-specific languages. High-level languages, such as Python, Java, and C++, are designed to be more human-readable and provide abstractions that simplify the process of coding. Low-level languages, like assembly or machine code, offer more direct control over computer hardware but are less accessible to human programmers.\n"
126 | ]
127 | },
128 | {
129 | "attachments": {},
130 | "cell_type": "markdown",
131 | "metadata": {},
132 | "source": [
133 | "
"
134 | ]
135 | },
136 | {
137 | "attachments": {},
138 | "cell_type": "markdown",
139 | "metadata": {},
140 | "source": [
141 | "
"
142 | ]
143 | },
144 | {
145 | "attachments": {},
146 | "cell_type": "markdown",
147 | "metadata": {},
148 | "source": [
149 | "## [Strengths and Applications](#toc0_)\n"
150 | ]
151 | },
152 | {
153 | "attachments": {},
154 | "cell_type": "markdown",
155 | "metadata": {},
156 | "source": [
157 | "Different programming languages have different strengths and areas of application. Some languages are optimized for web development, while others excel in scientific computing, data analysis, or artificial intelligence. For example, Python is widely used for web development, scientific computing, and machine learning due to its simplicity, versatility, and extensive libraries.\n"
158 | ]
159 | },
160 | {
161 | "attachments": {},
162 | "cell_type": "markdown",
163 | "metadata": {},
164 | "source": [
165 | "
"
166 | ]
167 | },
168 | {
169 | "attachments": {},
170 | "cell_type": "markdown",
171 | "metadata": {},
172 | "source": [
173 | "## [Considerations for Choosing a Programming Language](#toc0_)\n"
174 | ]
175 | },
176 | {
177 | "attachments": {},
178 | "cell_type": "markdown",
179 | "metadata": {},
180 | "source": [
181 | "When choosing a programming language, it is crucial to consider factors such as the nature of the project, the target platform or environment, the availability of resources and community support, and personal preferences or familiarity. Each language comes with its own trade-offs in terms of performance, development time, and scalability.\n"
182 | ]
183 | },
184 | {
185 | "attachments": {},
186 | "cell_type": "markdown",
187 | "metadata": {},
188 | "source": [
189 | "## [Learning a Programming Language](#toc0_)\n"
190 | ]
191 | },
192 | {
193 | "attachments": {},
194 | "cell_type": "markdown",
195 | "metadata": {},
196 | "source": [
197 | "Learning a programming language involves understanding its syntax, semantics, and best practices. It requires grasping fundamental programming concepts such as variables, data types, control structures, functions, and object-oriented programming principles. While the learning curve for each language may vary, many beginners find high-level languages like Python to be more approachable and beginner-friendly due to their clear syntax and extensive documentation.\n"
198 | ]
199 | },
200 | {
201 | "attachments": {},
202 | "cell_type": "markdown",
203 | "metadata": {},
204 | "source": [
205 | "
"
206 | ]
207 | },
208 | {
209 | "attachments": {},
210 | "cell_type": "markdown",
211 | "metadata": {},
212 | "source": [
213 | "## [The Evolution of Programming Languages](#toc0_)\n"
214 | ]
215 | },
216 | {
217 | "attachments": {},
218 | "cell_type": "markdown",
219 | "metadata": {},
220 | "source": [
221 | "The programming landscape is constantly evolving, with new languages and frameworks emerging to address specific needs and improve efficiency. Understanding the history and evolution of programming languages provides insights into the progression of programming concepts and the influence of different paradigms.\n"
222 | ]
223 | },
224 | {
225 | "attachments": {},
226 | "cell_type": "markdown",
227 | "metadata": {},
228 | "source": [
229 | "\n",
230 | "In the following sections, we will explore the features and applications of Python, a popular programming language known for its simplicity, versatility, and vibrant community support. We will also discuss the factors that make Python an attractive choice for both beginners and experienced programmers.\n"
231 | ]
232 | }
233 | ],
234 | "metadata": {
235 | "language_info": {
236 | "name": "python"
237 | },
238 | "orig_nbformat": 4
239 | },
240 | "nbformat": 4,
241 | "nbformat_minor": 2
242 | }
243 |
--------------------------------------------------------------------------------
/Lectures/01 Introduction/03 Why Choose Python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# Why Choose Python\n"
16 | ]
17 | },
18 | {
19 | "cell_type": "markdown",
20 | "metadata": {},
21 | "source": [
22 | "Python is a versatile and powerful programming language that has gained immense popularity among developers worldwide. It offers several compelling reasons why it is an excellent choice for both beginners and experienced programmers.\n"
23 | ]
24 | },
25 | {
26 | "cell_type": "markdown",
27 | "metadata": {},
28 | "source": [
29 | "**Table of contents** \n",
30 | "- [Python's Simplicity and Versatility](#toc1_) \n",
31 | "- [Strong Community and Support](#toc2_) \n",
32 | "- [Cross-platform Compatibility](#toc3_) \n",
33 | "- [Integration and Extensibility](#toc4_) \n",
34 | "- [Gentle Learning Curve](#toc5_) \n",
35 | "\n",
36 | "\n",
43 | ""
44 | ]
45 | },
46 | {
47 | "cell_type": "markdown",
48 | "metadata": {},
49 | "source": [
50 | "## [Python's Simplicity and Versatility](#toc0_)\n"
51 | ]
52 | },
53 | {
54 | "cell_type": "markdown",
55 | "metadata": {},
56 | "source": [
57 | "Python is renowned for its simplicity and clean syntax. Compared to other programming languages, Python has deliberately avoided clutter and has a relatively small number of reserved keywords. With Python, you can write code that is easy to learn, read, and understand. The language's emphasis on readability reduces the chances of syntax errors and promotes code maintainability.\n"
58 | ]
59 | },
60 | {
61 | "cell_type": "markdown",
62 | "metadata": {},
63 | "source": [
64 | "\n",
65 | "Despite its simplicity, Python supports a wide range of programming constructs expected in a high-level language. It offers complex dynamic data types, structured and functional programming paradigms, and comprehensive support for object-oriented programming. Moreover, Python boasts an extensive library of classes and functions that expand its capabilities beyond the core language, including database manipulation, GUI programming, and much more. This combination of simplicity and versatility makes Python an ideal language for a diverse array of applications and domains.\n"
66 | ]
67 | },
68 | {
69 | "cell_type": "markdown",
70 | "metadata": {},
71 | "source": [
72 | "
"
73 | ]
74 | },
75 | {
76 | "attachments": {},
77 | "cell_type": "markdown",
78 | "metadata": {},
79 | "source": [
80 | "
"
81 | ]
82 | },
83 | {
84 | "cell_type": "markdown",
85 | "metadata": {},
86 | "source": [
87 | "## [Strong Community and Support](#toc0_)\n"
88 | ]
89 | },
90 | {
91 | "cell_type": "markdown",
92 | "metadata": {},
93 | "source": [
94 | "Python has a vibrant and supportive community of developers. This community-driven approach has resulted in a wealth of resources, tutorials, and documentation available to learners and practitioners. The Python community is known for its inclusiveness, helpfulness, and collaborative spirit. Whether you encounter a challenging problem or need guidance on best practices, you can rely on the Python community for assistance.\n"
95 | ]
96 | },
97 | {
98 | "cell_type": "markdown",
99 | "metadata": {},
100 | "source": [
101 | "## [Cross-platform Compatibility](#toc0_)\n"
102 | ]
103 | },
104 | {
105 | "cell_type": "markdown",
106 | "metadata": {},
107 | "source": [
108 | "Python is a cross-platform programming language, enabling you to develop code on one operating system and seamlessly run it on various platforms, such as Windows, macOS, and Linux. This cross-platform compatibility eliminates the need for significant code modifications, saving developers time and effort. With Python, you can create applications that are not tied to a specific operating system, enhancing their portability and reach.\n"
109 | ]
110 | },
111 | {
112 | "cell_type": "markdown",
113 | "metadata": {},
114 | "source": [
115 | "## [Integration and Extensibility](#toc0_)\n"
116 | ]
117 | },
118 | {
119 | "cell_type": "markdown",
120 | "metadata": {},
121 | "source": [
122 | "Python excels in integration with other languages and technologies. It seamlessly interacts with languages like C, C++, and Java, allowing you to leverage existing codebases and libraries. Python's compatibility extends beyond language integration; it integrates well with databases, web services, and various frameworks. This integration capability makes Python an excellent choice for developing applications that require interoperability and leverage existing resources.\n"
123 | ]
124 | },
125 | {
126 | "attachments": {},
127 | "cell_type": "markdown",
128 | "metadata": {},
129 | "source": [
130 | "
"
131 | ]
132 | },
133 | {
134 | "cell_type": "markdown",
135 | "metadata": {},
136 | "source": [
137 | "## [Gentle Learning Curve](#toc0_)\n"
138 | ]
139 | },
140 | {
141 | "cell_type": "markdown",
142 | "metadata": {},
143 | "source": [
144 | "Python offers a gentle learning curve, making it accessible to beginners. The language's clear and concise syntax, coupled with extensive documentation and educational resources, facilitates quick understanding and practical application. Python's focus on readability and simplicity allows beginners to grasp programming concepts without being overwhelmed by complex syntax or intricate details. As a result, newcomers can gain confidence and start building useful applications relatively quickly.\n"
145 | ]
146 | },
147 | {
148 | "cell_type": "markdown",
149 | "metadata": {},
150 | "source": [
151 | "In conclusion, Python's simplicity, versatility, strong community, cross-platform compatibility, integration capabilities, and gentle learning curve make it a compelling choice for programmers of all levels. Whether you are starting your programming journey or seeking a powerful language for complex projects, Python provides the tools and support to meet your needs.\n"
152 | ]
153 | }
154 | ],
155 | "metadata": {
156 | "language_info": {
157 | "name": "python"
158 | },
159 | "orig_nbformat": 4
160 | },
161 | "nbformat": 4,
162 | "nbformat_minor": 2
163 | }
164 |
--------------------------------------------------------------------------------
/Lectures/01 Introduction/04 Python Features and Applications.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# Python's Features and Applications\n"
16 | ]
17 | },
18 | {
19 | "cell_type": "markdown",
20 | "metadata": {},
21 | "source": [
22 | "Python is known for its rich set of features that contribute to its versatility and popularity across various domains. These features, combined with its simplicity and strong community support, make Python an excellent choice for a wide range of applications.\n"
23 | ]
24 | },
25 | {
26 | "cell_type": "markdown",
27 | "metadata": {},
28 | "source": [
29 | "**Table of contents** \n",
30 | "- [Dynamic Typing and Automatic Memory Management](#toc1_) \n",
31 | "- [Extensive Standard Library and Third-Party Packages](#toc2_) \n",
32 | "- [Object-Oriented Programming (OOP)](#toc3_) \n",
33 | "- [Multiplatform Support](#toc4_) \n",
34 | "- [Web Development](#toc5_) \n",
35 | "- [Data Analysis and Scientific Computing](#toc6_) \n",
36 | "- [Machine Learning and Artificial Intelligence](#toc7_) \n",
37 | "\n",
38 | "\n",
45 | ""
46 | ]
47 | },
48 | {
49 | "cell_type": "markdown",
50 | "metadata": {},
51 | "source": [
52 | "## [Dynamic Typing and Automatic Memory Management](#toc0_)\n"
53 | ]
54 | },
55 | {
56 | "cell_type": "markdown",
57 | "metadata": {},
58 | "source": [
59 | "Python is dynamically typed, which means that you don't need to explicitly declare variable types. This flexibility allows for faster development and easier code maintenance. Python also employs automatic memory management through garbage collection, relieving developers from manual memory allocation and deallocation. This feature makes Python more user-friendly and reduces the risk of memory-related errors.\n"
60 | ]
61 | },
62 | {
63 | "cell_type": "markdown",
64 | "metadata": {},
65 | "source": [
66 | "
"
67 | ]
68 | },
69 | {
70 | "attachments": {},
71 | "cell_type": "markdown",
72 | "metadata": {},
73 | "source": [
74 | "
"
75 | ]
76 | },
77 | {
78 | "cell_type": "markdown",
79 | "metadata": {},
80 | "source": [
81 | "## [Extensive Standard Library and Third-Party Packages](#toc0_)\n"
82 | ]
83 | },
84 | {
85 | "cell_type": "markdown",
86 | "metadata": {},
87 | "source": [
88 | "Python comes with an extensive standard library that provides a wide range of modules and functionalities for tasks such as file I/O, networking, regular expressions, and more. The standard library enables developers to accomplish many common programming tasks without relying heavily on external dependencies.\n"
89 | ]
90 | },
91 | {
92 | "cell_type": "markdown",
93 | "metadata": {},
94 | "source": [
95 | "Additionally, Python has a vast ecosystem of third-party packages and frameworks. The Python Package Index (PyPI) hosts thousands of open-source packages developed by the Python community. These packages cover diverse domains, including web development (Django, Flask), scientific computing (NumPy, SciPy), machine learning (scikit-learn, TensorFlow), data analysis (pandas), and more. The availability of these packages accelerates development and allows you to leverage the collective expertise of the Python community.\n"
96 | ]
97 | },
98 | {
99 | "attachments": {},
100 | "cell_type": "markdown",
101 | "metadata": {},
102 | "source": [
103 | "
"
104 | ]
105 | },
106 | {
107 | "cell_type": "markdown",
108 | "metadata": {},
109 | "source": [
110 | "## [Object-Oriented Programming (OOP)](#toc0_)\n"
111 | ]
112 | },
113 | {
114 | "cell_type": "markdown",
115 | "metadata": {},
116 | "source": [
117 | "Python supports object-oriented programming (OOP) paradigms, allowing developers to create reusable and modular code. With classes, objects, and inheritance, you can structure your code in a way that reflects real-world objects and relationships. OOP principles facilitate code organization, encapsulation, and abstraction, making it easier to build and maintain complex projects.\n"
118 | ]
119 | },
120 | {
121 | "cell_type": "markdown",
122 | "metadata": {},
123 | "source": [
124 | "## [Multiplatform Support](#toc0_)\n"
125 | ]
126 | },
127 | {
128 | "cell_type": "markdown",
129 | "metadata": {},
130 | "source": [
131 | "Python is a cross-platform language, meaning it runs on various operating systems, including Windows, macOS, and Linux. This cross-platform compatibility allows developers to write code once and run it seamlessly on different platforms, eliminating the need for significant modifications. It ensures that your Python applications are portable and can reach a broader audience.\n"
132 | ]
133 | },
134 | {
135 | "cell_type": "markdown",
136 | "metadata": {},
137 | "source": [
138 | "## [Web Development](#toc0_)\n"
139 | ]
140 | },
141 | {
142 | "cell_type": "markdown",
143 | "metadata": {},
144 | "source": [
145 | "Python is widely used for web development. Frameworks such as Django and Flask provide robust tools for building scalable, secure, and high-performance web applications. These frameworks simplify tasks like URL routing, database integration, user authentication, and template rendering. Python's readability and clean syntax make web development in Python efficient and enjoyable.\n"
146 | ]
147 | },
148 | {
149 | "attachments": {},
150 | "cell_type": "markdown",
151 | "metadata": {},
152 | "source": [
153 | "
"
154 | ]
155 | },
156 | {
157 | "cell_type": "markdown",
158 | "metadata": {},
159 | "source": [
160 | "## [Data Analysis and Scientific Computing](#toc0_)\n"
161 | ]
162 | },
163 | {
164 | "cell_type": "markdown",
165 | "metadata": {},
166 | "source": [
167 | "Python's rich ecosystem of libraries, such as NumPy, SciPy, and pandas, has made it a go-to language for data analysis and scientific computing. These libraries offer powerful data structures, numerical computing capabilities, statistical functions, and data manipulation tools. Python, along with Jupyter notebooks, has become the de facto standard for data scientists and researchers due to its ease of use, interactive nature, and visualization capabilities.\n"
168 | ]
169 | },
170 | {
171 | "attachments": {},
172 | "cell_type": "markdown",
173 | "metadata": {},
174 | "source": [
175 | "
"
176 | ]
177 | },
178 | {
179 | "cell_type": "markdown",
180 | "metadata": {},
181 | "source": [
182 | "## [Machine Learning and Artificial Intelligence](#toc0_)\n"
183 | ]
184 | },
185 | {
186 | "cell_type": "markdown",
187 | "metadata": {},
188 | "source": [
189 | "Python has gained significant traction in the fields of machine learning and artificial intelligence (AI). Libraries like scikit-learn, TensorFlow, and PyTorch provide comprehensive tools for building and training machine learning models. Python's simplicity, coupled with these libraries, allows developers to experiment with various algorithms and models efficiently. The popularity of Python in the AI community is further amplified by frameworks like Keras\n"
190 | ]
191 | },
192 | {
193 | "attachments": {},
194 | "cell_type": "markdown",
195 | "metadata": {},
196 | "source": [
197 | "
"
198 | ]
199 | }
200 | ],
201 | "metadata": {
202 | "language_info": {
203 | "name": "python"
204 | },
205 | "orig_nbformat": 4
206 | },
207 | "nbformat": 4,
208 | "nbformat_minor": 2
209 | }
210 |
--------------------------------------------------------------------------------
/Lectures/01 Introduction/05 How Long Does it Take to Learn Python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# How Long Does It Take to Learn Python?"
16 | ]
17 | },
18 | {
19 | "cell_type": "markdown",
20 | "metadata": {},
21 | "source": [
22 | "\n",
23 | "The time required to learn Python can vary significantly depending on several factors. While there is no definitive answer to how long it takes to learn Python, understanding these factors can give you a better estimate of the learning journey.\n"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {},
29 | "source": [
30 | "**Table of contents** \n",
31 | "- [Factors that Influence Learning Journey](#toc1_) \n",
32 | "- [Learning Time Estimates](#toc2_) \n",
33 | "\n",
34 | "\n",
41 | ""
42 | ]
43 | },
44 | {
45 | "cell_type": "markdown",
46 | "metadata": {},
47 | "source": [
48 | "## [Factors that Influence Learning Journey](#toc0_)\n"
49 | ]
50 | },
51 | {
52 | "cell_type": "markdown",
53 | "metadata": {},
54 | "source": [
55 | "\n",
56 | "1. **Background and Experience**: Your prior programming experience can play a role in learning Python. If you have experience with other programming languages, concepts like variables, loops, and conditionals may already be familiar to you. This background knowledge can accelerate your Python learning process.\n",
57 | "\n",
58 | "2. **Motivation and Dedication**: Your level of motivation and dedication to learning Python is a crucial factor. The more time and effort you invest in practicing and studying Python, the quicker you will grasp the concepts and become proficient. Regular practice and consistent engagement with Python programming are key.\n",
59 | "\n",
60 | "3. **Learning Goals and Aims**: The extent to which you want to learn Python can influence the time required. Are you aiming to acquire basic proficiency for a specific task, or do you intend to become a professional Python developer? Clearly defining your learning goals and aims will help you allocate your time and focus on the relevant aspects of Python.\n",
61 | "\n",
62 | "4. **Availability of Time**: The amount of time you can dedicate to learning Python each day or week will impact your learning speed. If you have more hours available for studying and practicing Python, you will likely progress at a faster pace. Consistency and regularity of study sessions contribute to building a strong foundation in Python.\n",
63 | "\n",
64 | "5. **Mentorship and Guidance**: Having access to mentors or experienced Python developers who can provide guidance and answer your questions can significantly accelerate your learning. Their insights and expertise can help you avoid common pitfalls, understand best practices, and gain a deeper understanding of Python concepts.\n",
65 | "\n",
66 | "6. **Learning Resources**: The availability and quality of learning resources can also influence your learning journey. Utilizing well-structured tutorials, online courses, books, and interactive coding platforms can provide a structured learning path and expedite your progress. The diversity of learning materials allows you to choose resources that align with your preferred learning style.\n"
67 | ]
68 | },
69 | {
70 | "attachments": {},
71 | "cell_type": "markdown",
72 | "metadata": {},
73 | "source": [
74 | "> 🔫 Watch [Instagram Video](https://www.instagram.com/reel/CtoupCfADAv/?igshid=MzRlODBiNWFlZA%3D%3D)"
75 | ]
76 | },
77 | {
78 | "cell_type": "markdown",
79 | "metadata": {},
80 | "source": [
81 | "## [Learning Time Estimates](#toc0_)\n"
82 | ]
83 | },
84 | {
85 | "cell_type": "markdown",
86 | "metadata": {},
87 | "source": [
88 | "\n",
89 | "Given the various factors influencing the learning process, it's challenging to provide a precise timeline for learning Python. However, here are some general time estimates based on different levels of proficiency:\n",
90 | "\n",
91 | "1. **Basic Proficiency**: Acquiring basic proficiency in Python, including understanding core concepts, syntax, and basic programming constructs, can typically take around 4-8 weeks of consistent effort.\n",
92 | "\n",
93 | "2. **Intermediate Proficiency**: Reaching an intermediate level of Python proficiency, where you can comfortably work on small to medium-sized projects and leverage Python libraries and frameworks, may require 6-12 months of dedicated learning and practice.\n",
94 | "\n",
95 | "3. **Advanced Proficiency**: Achieving advanced proficiency in Python, allowing you to develop complex applications, optimize performance, and demonstrate expertise in specific domains like web development, data analysis, or machine learning, can take several years of continuous learning and practical experience.\n"
96 | ]
97 | },
98 | {
99 | "attachments": {},
100 | "cell_type": "markdown",
101 | "metadata": {},
102 | "source": [
103 | "> 🔫 Watch [Instagram Video](https://www.instagram.com/reel/CqqA4LCPEl0/?igshid=MzRlODBiNWFlZA%3D%3D)"
104 | ]
105 | },
106 | {
107 | "cell_type": "markdown",
108 | "metadata": {},
109 | "source": [
110 | "\n",
111 | "Remember that these estimates are subjective and can vary based on individual circumstances. The learning journey is ongoing, and as with any programming language, mastery of Python comes with continuous practice, exposure to real-world projects, and a commitment to lifelong learning.\n"
112 | ]
113 | },
114 | {
115 | "cell_type": "markdown",
116 | "metadata": {},
117 | "source": [
118 | "\n",
119 | "By considering the factors mentioned above and tailoring your learning approach accordingly, you can make steady progress in your Python journey and continually enhance your skills and knowledge.\n"
120 | ]
121 | },
122 | {
123 | "attachments": {},
124 | "cell_type": "markdown",
125 | "metadata": {},
126 | "source": [
127 | "As a final point, remember that consistency is more effective than motivation when learning Python programming. Motivation can be unreliable, while consistent practice builds a solid foundation and fosters continuous growth."
128 | ]
129 | },
130 | {
131 | "attachments": {},
132 | "cell_type": "markdown",
133 | "metadata": {},
134 | "source": [
135 | "
"
136 | ]
137 | }
138 | ],
139 | "metadata": {
140 | "language_info": {
141 | "name": "python"
142 | },
143 | "orig_nbformat": 4
144 | },
145 | "nbformat": 4,
146 | "nbformat_minor": 2
147 | }
148 |
--------------------------------------------------------------------------------
/Lectures/01 Introduction/06 Python Versions.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# Python Versions and Python 2 vs. Python 3"
16 | ]
17 | },
18 | {
19 | "cell_type": "markdown",
20 | "metadata": {},
21 | "source": [
22 | "Python has undergone significant changes and improvements over the years, resulting in different versions of the language. The two main versions that coexist are Python 2 and Python 3. Let's explore the differences between these versions and understand their implications.\n"
23 | ]
24 | },
25 | {
26 | "cell_type": "markdown",
27 | "metadata": {},
28 | "source": [
29 | "**Table of contents** \n",
30 | "- [Python 2](#toc1_) \n",
31 | "- [Python 3](#toc2_) \n",
32 | "- [Key Differences and Benefits of Python 3](#toc3_) \n",
33 | "- [Conclusion](#toc4_) \n",
34 | "\n",
35 | "\n",
42 | ""
43 | ]
44 | },
45 | {
46 | "cell_type": "markdown",
47 | "metadata": {},
48 | "source": [
49 | "## [Python 2](#toc0_)\n"
50 | ]
51 | },
52 | {
53 | "cell_type": "markdown",
54 | "metadata": {},
55 | "source": [
56 | "Python 2 was released in 2000 and quickly gained popularity among developers. It became the standard version of Python for over a decade. Many projects and libraries were built using Python 2, and it had a vast ecosystem of tools and packages.\n"
57 | ]
58 | },
59 | {
60 | "cell_type": "markdown",
61 | "metadata": {},
62 | "source": [
63 | "However, Python 2 reached its end of life in January 2020, meaning it is no longer actively maintained or updated by the Python core development team. This decision was made to shift focus and resources to Python 3, which brings significant improvements and enhancements to the language.\n"
64 | ]
65 | },
66 | {
67 | "cell_type": "markdown",
68 | "metadata": {},
69 | "source": [
70 | "## [Python 3](#toc0_)\n"
71 | ]
72 | },
73 | {
74 | "cell_type": "markdown",
75 | "metadata": {},
76 | "source": [
77 | "Python 3 was introduced in 2008 with the goal of addressing some of the design flaws and limitations of Python 2. It brought numerous improvements, including enhanced Unicode support, simplified syntax, improved performance, and additional features. However, these changes were not backward-compatible, which led to the coexistence of Python 2 and Python 3 for many years.\n"
78 | ]
79 | },
80 | {
81 | "cell_type": "markdown",
82 | "metadata": {},
83 | "source": [
84 | "
"
85 | ]
86 | },
87 | {
88 | "attachments": {},
89 | "cell_type": "markdown",
90 | "metadata": {},
91 | "source": [
92 | "As of June 2023, the latest stable version of Python was Python 3.10. To get the most up-to-date information on the latest Python version, visit the official Python website at [python.org](https://www.python.org/downloads/) or checking the Python Software Foundation's announcements and release notes."
93 | ]
94 | },
95 | {
96 | "cell_type": "markdown",
97 | "metadata": {},
98 | "source": [
99 | "## [Key Differences and Benefits of Python 3](#toc0_)\n"
100 | ]
101 | },
102 | {
103 | "cell_type": "markdown",
104 | "metadata": {},
105 | "source": [
106 | "1. **Print Statement vs. Print Function**: In Python 2, the print statement was used for outputting text, while Python 3 introduced the print function, making it consistent with other function calls in the language.\n",
107 | "\n",
108 | "2. **Unicode Support**: Python 3 offers better support for Unicode, making it easier to handle and process text from different languages and character sets.\n",
109 | "\n",
110 | "3. **Improved Syntax**: Python 3 introduced several syntax enhancements and language improvements, making the code more readable and reducing ambiguity.\n",
111 | "\n",
112 | "4. **Enhanced Libraries and Modules**: As Python 3 gained traction, many libraries and modules started focusing on Python 3 compatibility, offering new features and improvements that were not available in Python 2.\n",
113 | "\n",
114 | "5. **Future Development and Community Support**: Python 3 is actively developed and receives regular updates, bug fixes, and security patches. The Python community and ecosystem have largely transitioned to Python 3, resulting in more resources, documentation, and community support.\n"
115 | ]
116 | },
117 | {
118 | "cell_type": "markdown",
119 | "metadata": {},
120 | "source": [
121 | "## [Conclusion](#toc0_)\n"
122 | ]
123 | },
124 | {
125 | "cell_type": "markdown",
126 | "metadata": {},
127 | "source": [
128 | "Python 3 is the present and future of the Python programming language. With its improved syntax, enhanced libraries, and ongoing community support, Python 3 offers numerous benefits over Python 2. While the transition from Python 2 to Python 3 may require some effort, it is a worthwhile investment to leverage the latest advancements and ensure compatibility with the growing Python ecosystem.\n"
129 | ]
130 | }
131 | ],
132 | "metadata": {
133 | "language_info": {
134 | "name": "python"
135 | },
136 | "orig_nbformat": 4
137 | },
138 | "nbformat": 4,
139 | "nbformat_minor": 2
140 | }
141 |
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/assembly.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/assembly.jpeg
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/banner.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/consistency-vs-motivation.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/consistency-vs-motivation.jpg
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/dont-do-this.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/dont-do-this.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/how-to-ask/dont-ask-to-ask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/how-to-ask/dont-ask-to-ask.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/how-to-ask/no-hello.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/how-to-ask/no-hello.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/how-to-ask/xy-problem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/how-to-ask/xy-problem.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/languages-types.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/languages-types.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/learning-programming-tips.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/learning-programming-tips.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/programming-languages-timeline.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/programming-languages-timeline.webp
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/programming-languages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/programming-languages.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-calling-cpp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-calling-cpp.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-ml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-ml.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-pypi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-pypi.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-scientific-computing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-scientific-computing.jpg
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-versions-timeline.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-versions-timeline.jpg
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-vs-c-memory-management.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-vs-c-memory-management.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-vs-c-typing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-vs-c-typing.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-vs-java-hello-world.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-vs-java-hello-world.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-vs-java-read-file.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-vs-java-read-file.jpeg
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-vs-java-read-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-vs-java-read-file.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/python-web-frameworks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/python-web-frameworks.png
--------------------------------------------------------------------------------
/Lectures/01 Introduction/images/try-this.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/01 Introduction/images/try-this.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/01 Introduction to Python Development Environment.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# Introduction to Python Development Environment\n"
16 | ]
17 | },
18 | {
19 | "attachments": {},
20 | "cell_type": "markdown",
21 | "metadata": {},
22 | "source": [
23 | "In this section, we will provide an overview of the Python development environment and discuss the benefits of using VS Code, Jupyter Notebook, and Conda together. Understanding the tools and their advantages will set the foundation for a seamless Python development experience.\n"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {},
29 | "source": [
30 | "**Table of contents** \n",
31 | "- [Python Development Environment](#toc1_) \n",
32 | "- [VS Code (Visual Studio Code)](#toc2_) \n",
33 | "- [Jupyter Notebook](#toc3_) \n",
34 | "- [Conda](#toc4_) \n",
35 | "- [Benefits of using VS Code, Jupyter Notebook, and Conda together](#toc5_) \n",
36 | "\n",
37 | "\n",
44 | ""
45 | ]
46 | },
47 | {
48 | "cell_type": "markdown",
49 | "metadata": {},
50 | "source": [
51 | "## [Python Development Environment](#toc0_)\n"
52 | ]
53 | },
54 | {
55 | "cell_type": "markdown",
56 | "metadata": {},
57 | "source": [
58 | "The Python development environment refers to the set of tools and software configurations required to write, run, debug, and manage Python code efficiently. It encompasses text editors or integrated development environments (IDEs), package managers, and other supporting tools that enhance the development workflow.\n"
59 | ]
60 | },
61 | {
62 | "cell_type": "markdown",
63 | "metadata": {},
64 | "source": [
65 | "## [VS Code (Visual Studio Code)](#toc0_)\n"
66 | ]
67 | },
68 | {
69 | "attachments": {},
70 | "cell_type": "markdown",
71 | "metadata": {},
72 | "source": [
73 | "
"
74 | ]
75 | },
76 | {
77 | "cell_type": "markdown",
78 | "metadata": {},
79 | "source": [
80 | "VS Code is a lightweight and highly customizable code editor developed by Microsoft. It offers robust features for Python development, including syntax highlighting, code completion, debugging support, version control integration, and extensibility through a wide range of extensions.\n"
81 | ]
82 | },
83 | {
84 | "cell_type": "markdown",
85 | "metadata": {},
86 | "source": [
87 | "## [Jupyter Notebook](#toc0_)\n"
88 | ]
89 | },
90 | {
91 | "attachments": {},
92 | "cell_type": "markdown",
93 | "metadata": {},
94 | "source": [
95 | "
"
96 | ]
97 | },
98 | {
99 | "attachments": {},
100 | "cell_type": "markdown",
101 | "metadata": {},
102 | "source": [
103 | "Jupyter Notebook is an interactive computing environment that allows users to create and share documents containing live code, visualizations, explanatory text, and more. It is particularly useful for data analysis, exploratory programming, and documentation purposes.\n",
104 | "\n",
105 | "> Note: To enhance the functionality of VS Code for Jupyter Notebook development, we will be utilizing the Jupyter Notebook extension. This extension enables seamless integration between VS Code and Jupyter Notebook, allowing you to create, edit, and run Jupyter notebooks directly within the editor. It provides features such as cell execution, interactive outputs, and markdown rendering, making it a powerful tool for data analysis and prototyping."
106 | ]
107 | },
108 | {
109 | "cell_type": "markdown",
110 | "metadata": {},
111 | "source": [
112 | "## [Conda](#toc0_)\n"
113 | ]
114 | },
115 | {
116 | "attachments": {},
117 | "cell_type": "markdown",
118 | "metadata": {},
119 | "source": [
120 | "
"
121 | ]
122 | },
123 | {
124 | "cell_type": "markdown",
125 | "metadata": {},
126 | "source": [
127 | "Conda is a popular package manager and environment management system for Python and other programming languages. It simplifies the process of installing, managing, and organizing packages and dependencies within isolated environments, ensuring reproducibility and avoiding conflicts between different projects.\n"
128 | ]
129 | },
130 | {
131 | "cell_type": "markdown",
132 | "metadata": {},
133 | "source": [
134 | "## [Benefits of using VS Code, Jupyter Notebook, and Conda together](#toc0_)\n"
135 | ]
136 | },
137 | {
138 | "attachments": {},
139 | "cell_type": "markdown",
140 | "metadata": {},
141 | "source": [
142 | "1. **Seamless integration**: VS Code provides a powerful and user-friendly interface for editing Python code, while Jupyter Notebook offers a versatile environment for interactive development and data analysis. Conda serves as a reliable package manager to install and manage Python packages within isolated environments, ensuring consistent and reproducible setups.\n"
143 | ]
144 | },
145 | {
146 | "attachments": {},
147 | "cell_type": "markdown",
148 | "metadata": {},
149 | "source": [
150 | "2. **Enhanced productivity**: VS Code's rich features, such as code snippets, intelligent autocompletion, and integrated debugging, significantly enhance the productivity of Python developers. Jupyter Notebook's interactive nature allows for rapid prototyping and iterative development, making it well-suited for data exploration and experimentation.\n"
151 | ]
152 | },
153 | {
154 | "attachments": {},
155 | "cell_type": "markdown",
156 | "metadata": {},
157 | "source": [
158 | "3. **Flexible collaboration**: Both VS Code and Jupyter Notebook facilitate collaboration among developers and data scientists. VS Code supports version control integration, allowing for smooth collaboration using Git or other source control systems. Jupyter Notebook files can be easily shared and viewed, enabling effective collaboration and documentation of data analysis workflows.\n"
159 | ]
160 | },
161 | {
162 | "attachments": {},
163 | "cell_type": "markdown",
164 | "metadata": {},
165 | "source": [
166 | "4. **Scalability and reproducibility**: Conda provides a scalable environment management system, allowing you to create and manage isolated environments with specific package versions and dependencies. This ensures reproducibility across different machines and simplifies the deployment process.\n"
167 | ]
168 | },
169 | {
170 | "cell_type": "markdown",
171 | "metadata": {},
172 | "source": [
173 | "By leveraging the capabilities of VS Code, Jupyter Notebook, and Conda, you can create a powerful and efficient Python development environment tailored to your specific needs. In the following sections, we will guide you through the installation and setup process, enabling you to harness the full potential of these tools for your Python projects."
174 | ]
175 | }
176 | ],
177 | "metadata": {
178 | "language_info": {
179 | "name": "python"
180 | },
181 | "orig_nbformat": 4
182 | },
183 | "nbformat": 4,
184 | "nbformat_minor": 2
185 | }
186 |
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/03 How the File System Works in Unix-Based Systems.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "# How the File System Works in Unix-Based Systems\n",
15 | "\n",
16 | "In Unix-based systems (such as Linux and macOS), the file system follows a hierarchical structure. It is organized as a tree-like directory structure, starting from the root directory and branching out into subdirectories."
17 | ]
18 | },
19 | {
20 | "cell_type": "markdown",
21 | "metadata": {},
22 | "source": [
23 | "**Table of contents** \n",
24 | "- [The Root Directory](#toc1_) \n",
25 | "- [Directory Structure](#toc2_) \n",
26 | "- [Directory Tree Representation](#toc3_) \n",
27 | "- [Difference from the Windows File System](#toc4_) \n",
28 | "\n",
29 | "\n",
36 | ""
37 | ]
38 | },
39 | {
40 | "cell_type": "markdown",
41 | "metadata": {},
42 | "source": [
43 | "## [The Root Directory](#toc0_)"
44 | ]
45 | },
46 | {
47 | "cell_type": "markdown",
48 | "metadata": {},
49 | "source": [
50 | "\n",
51 | "The root directory, denoted by a forward slash (`/`), is the topmost directory in the file system hierarchy. All other directories and files are located within the root directory or its subdirectories. In Unix-based systems, the root directory is the equivalent of the `C:\\` drive in Windows.\n"
52 | ]
53 | },
54 | {
55 | "cell_type": "markdown",
56 | "metadata": {},
57 | "source": [
58 | "\n",
59 | "## [Directory Structure](#toc0_)\n"
60 | ]
61 | },
62 | {
63 | "cell_type": "markdown",
64 | "metadata": {},
65 | "source": [
66 | "
"
67 | ]
68 | },
69 | {
70 | "cell_type": "markdown",
71 | "metadata": {},
72 | "source": [
73 | "\n",
74 | "Unix-based systems have a unified file system structure, where directories and files are represented as nodes in the directory tree. Here is an overview of common directories you may encounter in a Unix-based system:\n",
75 | "\n",
76 | "- **`/bin`**: Contains essential executable files (commands) for system boot and basic system functionality.\n",
77 | "- **`/boot`**: Contains files required for the system boot process, including the kernel, bootloader, and initial RAM disk.\n",
78 | "- **`/dev`**: Contains device files that represent hardware devices attached to the system, such as disk drives, printers, and terminals.\n",
79 | "- **`/etc`**: Stores system-wide configuration files, including network settings, user management, and application configurations.\n",
80 | "- **`/home`**: Each user on the system typically has a dedicated subdirectory within `/home`, where their personal files and settings are stored.\n",
81 | "- **`/lib`** and **/lib64**: Houses libraries required by the system and various applications.\n",
82 | "- **`/media`**: Mount point for removable media devices, such as USB drives or external hard disks.\n",
83 | "- **`/opt`**: Optionally holds software packages installed by the system administrator or third-party software.\n",
84 | "- **`/proc`**: Virtual file system that provides information about processes, system status, and configuration settings.\n",
85 | "- **`/root`**: The home directory for the root user (superuser) account.\n",
86 | "- **`/sbin`**: Contains system administration binaries (commands) used for system maintenance and management.\n",
87 | "- **`/tmp`**: Temporary directory for storing files that are only needed temporarily. Files in this directory are usually deleted on system reboot.\n",
88 | "- **`/usr`**: Holds user-related programs, libraries, and documentation. It is often the largest directory in the system.\n",
89 | "- **`/var`**: Contains variable data files, including log files, system databases, and caches.\n"
90 | ]
91 | },
92 | {
93 | "cell_type": "markdown",
94 | "metadata": {},
95 | "source": [
96 | "\n",
97 | "This is just a high-level overview of the directory structure in a Unix-based system. Depending on the specific distribution and configuration, additional directories may exist.\n"
98 | ]
99 | },
100 | {
101 | "cell_type": "markdown",
102 | "metadata": {},
103 | "source": [
104 | "\n",
105 | "## [Directory Tree Representation](#toc0_)\n"
106 | ]
107 | },
108 | {
109 | "cell_type": "markdown",
110 | "metadata": {},
111 | "source": [
112 | "\n",
113 | "Here's a representation of the directory structure starting from the root directory:\n",
114 | "```\n",
115 | "/\n",
116 | "|-- bin\n",
117 | "|-- boot\n",
118 | "|-- dev\n",
119 | "|-- etc\n",
120 | "|-- home\n",
121 | "| |-- user1\n",
122 | "| |-- user2\n",
123 | "|-- lib\n",
124 | "|-- lib64\n",
125 | "|-- media\n",
126 | "|-- opt\n",
127 | "|-- proc\n",
128 | "|-- root\n",
129 | "|-- sbin\n",
130 | "|-- tmp\n",
131 | "|-- usr\n",
132 | "|-- var\n",
133 | "```\n"
134 | ]
135 | },
136 | {
137 | "cell_type": "markdown",
138 | "metadata": {},
139 | "source": [
140 | "This representation uses \"|\" and \"-\" characters to illustrate the hierarchy of directories. Each \"|\" represents a level of indentation, and each \"-\" represents the connection between directories.\n"
141 | ]
142 | },
143 | {
144 | "cell_type": "markdown",
145 | "metadata": {},
146 | "source": [
147 | "\n",
148 | "## [Difference from the Windows File System](#toc0_)\n"
149 | ]
150 | },
151 | {
152 | "cell_type": "markdown",
153 | "metadata": {},
154 | "source": [
155 | "\n",
156 | "The Unix-based file system differs from the Windows file system in several ways:\n"
157 | ]
158 | },
159 | {
160 | "cell_type": "markdown",
161 | "metadata": {},
162 | "source": [
163 | "\n",
164 | "1. **Path Separator**: Unix-based systems use a forward slash (`/`) as the path separator, while Windows uses a backslash (`\\`).\n",
165 | "\n",
166 | "2. **Drive Letters**: Windows assigns drive letters (e.g., C:, D:) to different storage devices, while Unix-based systems have a single unified directory structure starting from the root directory.\n",
167 | "\n",
168 | "3. **File Naming Conventions**: Windows is case-insensitive when it comes to file and directory names, while Unix-based systems are case-sensitive.\n",
169 | "\n",
170 | "4. **File Permissions**: Unix-based systems use a permission system (read, write, execute) to control access to files and directories, while Windows uses access control lists (ACLs).\n"
171 | ]
172 | },
173 | {
174 | "cell_type": "markdown",
175 | "metadata": {},
176 | "source": [
177 | "\n",
178 | "Understanding the Unix-based file system and its differences from Windows will help you navigate and work effectively within the terminal environment.\n"
179 | ]
180 | },
181 | {
182 | "cell_type": "markdown",
183 | "metadata": {},
184 | "source": [
185 | "\n",
186 | "Now that we have a good understanding of the file system in Unix-based systems, let's continue exploring the terminal and its commands!\n"
187 | ]
188 | }
189 | ],
190 | "metadata": {
191 | "language_info": {
192 | "name": "python"
193 | },
194 | "orig_nbformat": 4
195 | },
196 | "nbformat": 4,
197 | "nbformat_minor": 2
198 | }
199 |
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/04 Command-Line Crash Course.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "# Command-Line Crash Course\n"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "**Table of contents** \n",
22 | "- [Why is the Terminal Important?](#toc1_) \n",
23 | "- [Navigating the File System](#toc2_) \n",
24 | "- [Working with Files and Directories](#toc3_) \n",
25 | "- [Additional Useful Commands](#toc4_) \n",
26 | "- [Tips and Tricks](#toc5_) \n",
27 | "\n",
28 | "\n",
35 | ""
36 | ]
37 | },
38 | {
39 | "cell_type": "markdown",
40 | "metadata": {},
41 | "source": [
42 | "In this section, we will explore the terminal, also known as the command-line interface (CLI). The terminal is a powerful tool that allows you to interact with your computer using text-based commands. As a Python developer, understanding and using the terminal is essential for tasks such as running scripts, managing files, and executing various development tools.\n"
43 | ]
44 | },
45 | {
46 | "cell_type": "markdown",
47 | "metadata": {},
48 | "source": [
49 | "## [Why is the Terminal Important?](#toc0_)\n"
50 | ]
51 | },
52 | {
53 | "cell_type": "markdown",
54 | "metadata": {},
55 | "source": [
56 | "The terminal offers several advantages for developers:\n",
57 | "\n",
58 | "- **Efficiency**: Performing tasks through commands can be faster than using a graphical user interface (GUI) for certain operations.\n",
59 | "- **Flexibility**: The terminal provides access to a wide range of tools and utilities, allowing you to perform complex operations and customization.\n",
60 | "- **Automation**: By combining commands and scripting, you can automate repetitive tasks and create powerful workflows.\n"
61 | ]
62 | },
63 | {
64 | "cell_type": "markdown",
65 | "metadata": {},
66 | "source": [
67 | "## [Navigating the File System](#toc0_)\n"
68 | ]
69 | },
70 | {
71 | "cell_type": "markdown",
72 | "metadata": {},
73 | "source": [
74 | "Before diving into the terminal commands, let's start with basic navigation. You'll need to understand how to move around the file system to work effectively.\n",
75 | "\n",
76 | "- `cd` (change directory) allows you to move between directories.\n",
77 | " - Example: `cd Documents` (Moves to the \"Documents\" directory).\n",
78 | "\n",
79 | "- `ls` (list) displays the files and directories in the current directory.\n",
80 | " - Example: `ls` (Lists files and directories in the current directory).\n",
81 | "\n",
82 | "- `pwd` (print working directory) shows the current directory's path.\n",
83 | " - Example: `pwd` (Displays the path of the current directory).\n"
84 | ]
85 | },
86 | {
87 | "cell_type": "markdown",
88 | "metadata": {},
89 | "source": [
90 | "## [Working with Files and Directories](#toc0_)\n"
91 | ]
92 | },
93 | {
94 | "cell_type": "markdown",
95 | "metadata": {},
96 | "source": [
97 | "Creating, managing, and manipulating files and directories is a fundamental part of working with the terminal.\n",
98 | "\n",
99 | "- `mkdir` creates directories.\n",
100 | " - Example: `mkdir new_directory` (Creates a new directory named \"new_directory\").\n",
101 | "\n",
102 | "- `touch` creates files.\n",
103 | " - Example: `touch new_file.txt` (Creates a new file named \"new_file.txt\").\n",
104 | "\n",
105 | "- `rm` removes files and directories.\n",
106 | " - Example: `rm file.txt` (Removes the file \"file.txt\").\n",
107 | "\n",
108 | "- `rmdir` removes empty directories.\n",
109 | " - Example: `rmdir empty_directory` (Removes the empty directory \"empty_directory\").\n",
110 | "\n",
111 | "- `cp` copies files and directories.\n",
112 | " - Example: `cp file.txt copy_file.txt` (Creates a copy of \"file.txt\" named \"copy_file.txt\").\n",
113 | "\n",
114 | "- `mv` moves or renames files and directories.\n",
115 | " - Example: `mv file.txt new_directory/` (Moves the file \"file.txt\" to the \"new_directory\" directory).\n",
116 | " - Example: `mv file.txt renamed_file.txt` (Renames \"file.txt\" to \"renamed_file.txt\").\n"
117 | ]
118 | },
119 | {
120 | "cell_type": "markdown",
121 | "metadata": {},
122 | "source": [
123 | "## [Additional Useful Commands](#toc0_)\n"
124 | ]
125 | },
126 | {
127 | "cell_type": "markdown",
128 | "metadata": {},
129 | "source": [
130 | "Besides file management, there are many other handy terminal commands to explore:\n",
131 | "\n",
132 | "- `history` shows your command history.\n",
133 | " - Example: `history` (Displays a list of recently executed commands).\n",
134 | "\n",
135 | "- `clear` clears the terminal screen.\n",
136 | " - Example: `clear` (Clears the terminal screen).\n",
137 | "\n",
138 | "- `wget` downloads files from the web.\n",
139 | " - Example: `wget http://example.com/file.txt` (Downloads \"file.txt\" from the web).\n",
140 | "\n",
141 | "- `curl` transfers data to or from a server.\n",
142 | " - Example: `curl -o file.txt http://example.com/file.txt` (Downloads \"file.txt\" from the web using cURL).\n"
143 | ]
144 | },
145 | {
146 | "cell_type": "markdown",
147 | "metadata": {},
148 | "source": [
149 | "## [Tips and Tricks](#toc0_)\n"
150 | ]
151 | },
152 | {
153 | "cell_type": "markdown",
154 | "metadata": {},
155 | "source": [
156 | "Finally, we'll share some tips and tricks to help you become more efficient and effective in the terminal. These insights can significantly improve your workflow and productivity.\n"
157 | ]
158 | },
159 | {
160 | "cell_type": "markdown",
161 | "metadata": {},
162 | "source": [
163 | "Remember to practice and experiment with the commands as you learn them. The terminal is a powerful tool, and gaining proficiency will greatly benefit you as a Python developer.\n"
164 | ]
165 | },
166 | {
167 | "cell_type": "markdown",
168 | "metadata": {},
169 | "source": [
170 | "Now, let's jump in and start exploring the world of terminal commands!"
171 | ]
172 | }
173 | ],
174 | "metadata": {
175 | "language_info": {
176 | "name": "python"
177 | },
178 | "orig_nbformat": 4
179 | },
180 | "nbformat": 4,
181 | "nbformat_minor": 2
182 | }
183 |
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/06 Getting Started with Visual Studio Code.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# Getting Started with Visual Studio Code for Python Development\n"
16 | ]
17 | },
18 | {
19 | "cell_type": "markdown",
20 | "metadata": {},
21 | "source": [
22 | "In this lecture, we will explore how to work with Visual Studio Code (VS Code) for Python development. VS Code provides an excellent environment for coding in Python, and we will introduce two essential extensions that will elevate your Python development experience. These extensions are all you need for now to get started with productive Python programming in VS Code.\n"
23 | ]
24 | },
25 | {
26 | "cell_type": "markdown",
27 | "metadata": {},
28 | "source": [
29 | "**Table of contents** \n",
30 | "- [Opening VS Code in Different Directories and Files](#toc1_) \n",
31 | "- [Interface Tour](#toc2_) \n",
32 | "- [Extensions](#toc3_) \n",
33 | " - [Python Extension](#toc3_1_) \n",
34 | " - [Jupyter Extension](#toc3_2_) \n",
35 | "- [Basic Editing](#toc4_) \n",
36 | "\n",
37 | "\n",
44 | ""
45 | ]
46 | },
47 | {
48 | "cell_type": "markdown",
49 | "metadata": {},
50 | "source": [
51 | "## [Opening VS Code in Different Directories and Files](#toc0_)"
52 | ]
53 | },
54 | {
55 | "cell_type": "markdown",
56 | "metadata": {},
57 | "source": [
58 | "VS Code's flexibility allows you to open it in various directories or project folders. There are a few ways to achieve this:\n",
59 | "\n",
60 | "- **Method 1:** Launch VS Code, and then go to `File -> Open Folder...` or use the keyboard shortcut `Ctrl+K Ctrl+O` (Windows/Linux) or `Cmd+K Cmd+O` (Mac). Browse to the desired directory and click \"Open.\"\n",
61 | "\n",
62 | "- **Method 2:** Right-click on the folder you want to open in VS Code in your file explorer, and select \"Open with Code\" (the option may be labeled differently based on your operating system).\n",
63 | "\n",
64 | "- **Method 3:** Open the terminal, navigate to the desired directory using the `cd` command, and then type `code .` (including the dot at the end). This command will open VS Code in the current directory.\n"
65 | ]
66 | },
67 | {
68 | "cell_type": "markdown",
69 | "metadata": {},
70 | "source": [
71 | "Sometimes you may want to work on a single file without opening the entire project. Here's how to open a single file in VS Code:\n",
72 | "\n",
73 | "- **Method 1:** Launch VS Code, and then go to `File -> Open...` or use the keyboard shortcut `Ctrl+O` (Windows/Linux) or `Cmd+O` (Mac). Browse to the file you want to open and click \"Open.\"\n",
74 | "\n",
75 | "- **Method 2:** In your file explorer, right-click on the file and select \"Open with Code\" (the option may be labeled differently based on your operating system).\n"
76 | ]
77 | },
78 | {
79 | "cell_type": "markdown",
80 | "metadata": {},
81 | "source": [
82 | "## [Interface Tour](#toc0_)\n"
83 | ]
84 | },
85 | {
86 | "cell_type": "markdown",
87 | "metadata": {},
88 | "source": [
89 | "Let's begin our journey by getting familiar with the VS Code interface. Upon launching VS Code, you'll notice a clean and straightforward layout designed to maximize productivity. The main components include:\n",
90 | "- **Editor:** The central area where you write and edit your code. It offers a plethora of functionalities to ease your coding experience.\n",
91 | "- **Sidebar:** On the left-hand side, you'll find the sidebar with various panels, such as the Explorer for file navigation, Source Control for version control, and Extensions for managing your installed extensions.\n",
92 | "- **Status Bar:** Situated at the bottom, the status bar displays essential information like the file type, line and column numbers, and indentation settings.\n",
93 | "- **Command Palette:** Accessible through `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (Mac), the Command Palette allows you to execute commands and access various features with ease.\n"
94 | ]
95 | },
96 | {
97 | "cell_type": "markdown",
98 | "metadata": {},
99 | "source": [
100 | "## [Extensions](#toc0_)\n"
101 | ]
102 | },
103 | {
104 | "cell_type": "markdown",
105 | "metadata": {},
106 | "source": [
107 | "One of the most compelling aspects of VS Code is its extensibility. Extensions are add-ons that enhance the editor's capabilities, tailored to different programming languages, frameworks, and development workflows.\n"
108 | ]
109 | },
110 | {
111 | "cell_type": "markdown",
112 | "metadata": {},
113 | "source": [
114 | "### [Python Extension](#toc0_)\n"
115 | ]
116 | },
117 | {
118 | "cell_type": "markdown",
119 | "metadata": {},
120 | "source": [
121 | "
"
122 | ]
123 | },
124 | {
125 | "cell_type": "markdown",
126 | "metadata": {},
127 | "source": [
128 | "The Python extension is a must-have for any Python developer using VS Code. It brings powerful Python language support, code linting, debugging, and testing capabilities right to your fingertips. With this extension, you'll benefit from features like:\n",
129 | "\n",
130 | "- **IntelliSense for Python:** Enjoy intelligent code completion, which suggests Python keywords, modules, classes, functions, and even your custom-defined objects as you type.\n",
131 | "- **Code Linting:** Catch potential errors and enforce coding standards using the integrated linter. This helps maintain clean and error-free code.\n",
132 | "- **Code Formatting:** Keep your code consistent and readable by automatically formatting it according to the PEP 8 style guide.\n",
133 | "- **Code Navigation:** Easily navigate through your codebase with features like \"Go to Definition\" and \"Find All References.\"\n",
134 | "- **Interactive Python Experience:** Run Python code interactively within VS Code's integrated terminal.\n"
135 | ]
136 | },
137 | {
138 | "cell_type": "markdown",
139 | "metadata": {},
140 | "source": [
141 | "### [Jupyter Extension](#toc0_)\n"
142 | ]
143 | },
144 | {
145 | "attachments": {},
146 | "cell_type": "markdown",
147 | "metadata": {},
148 | "source": [
149 | "
"
150 | ]
151 | },
152 | {
153 | "cell_type": "markdown",
154 | "metadata": {},
155 | "source": [
156 | "The Jupyter extension is another valuable addition to your Python toolkit in VS Code. It enables seamless integration with Jupyter notebooks, a popular choice for data analysis, visualization, and experimentation. With this extension, you can:\n",
157 | "\n",
158 | "- **Open and Edit Notebooks:** Easily create, open, and edit Jupyter notebooks right within the VS Code environment.\n",
159 | "- **Intelligent Notebook Editing:** Leverage VS Code's IntelliSense and code editing capabilities when working on Jupyter notebooks.\n",
160 | "- **Kernel Management:** Manage and switch between different Python kernels associated with your Jupyter notebooks.\n",
161 | "\n",
162 | "With these extensions installed, you'll have a robust and feature-rich Python development environment.\n"
163 | ]
164 | },
165 | {
166 | "cell_type": "markdown",
167 | "metadata": {},
168 | "source": [
169 | "## [Basic Editing](#toc0_)\n",
170 | "\n",
171 | "Before diving into advanced features, let's master the basics of code editing in VS Code. Open a file by clicking `File -> Open` or using the keyboard shortcut `Ctrl+O` (Windows/Linux) or `Cmd+O` (Mac). Save your changes with `Ctrl+S` (Windows/Linux) or `Cmd+S` (Mac). You can use essential editing commands such as cut, copy, paste, and undo with familiar shortcuts.\n"
172 | ]
173 | }
174 | ],
175 | "metadata": {
176 | "language_info": {
177 | "name": "python"
178 | },
179 | "orig_nbformat": 4
180 | },
181 | "nbformat": 4,
182 | "nbformat_minor": 2
183 | }
184 |
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/07 What is a Package Manager.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# What is a Package Manager?\n"
16 | ]
17 | },
18 | {
19 | "cell_type": "markdown",
20 | "metadata": {},
21 | "source": [
22 | "\n",
23 | "In this section, we will walk you through the process of installing Conda, a popular package manager and environment management system. We recommend using Miniconda, which is a lightweight version of Anaconda. The installation steps provided below will ensure that you have the necessary tools to create and manage Python environments effectively.\n"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {},
29 | "source": [
30 | "**Table of contents** \n",
31 | "- [How Package Managers Work](#toc1_) \n",
32 | "- [Scenario: Two People Creating Conda Environments](#toc2_) \n",
33 | "- [Benefits of Using a Package Manager](#toc3_) \n",
34 | "\n",
35 | "\n",
42 | ""
43 | ]
44 | },
45 | {
46 | "cell_type": "markdown",
47 | "metadata": {},
48 | "source": [
49 | "\n",
50 | "## [How Package Managers Work](#toc0_)\n"
51 | ]
52 | },
53 | {
54 | "cell_type": "markdown",
55 | "metadata": {},
56 | "source": [
57 | "When you write Python code, it often relies on external libraries or tools to perform specific tasks, like handling data, plotting graphs, or connecting to databases. These external libraries are called packages. Think of them as ready-to-use modules that extend Python's capabilities and save you time by providing pre-built functionality."
58 | ]
59 | },
60 | {
61 | "cell_type": "markdown",
62 | "metadata": {},
63 | "source": [
64 | "\n",
65 | "Now, imagine you're a Python developer working on a project that uses several packages. The challenge arises when different projects might require different versions of the same package or even entirely different sets of packages. If you install all these packages globally on your computer, you may encounter conflicts, where one project needs an older version of a package, while another requires a newer version."
66 | ]
67 | },
68 | {
69 | "cell_type": "markdown",
70 | "metadata": {},
71 | "source": [
72 | "Here's where environments and package managers come to the rescue:\n",
73 | "\n",
74 | "- **Package Versions**: Packages can have multiple versions, each with its own set of features, bug fixes, and changes. However, not all projects may be compatible with the latest versions of packages they rely on. Therefore, it's crucial to manage specific package versions to maintain code stability and prevent unexpected behavior.\n",
75 | "\n",
76 | "- **Environment**: An environment is like a self-contained workspace for a Python project. It allows developers to isolate their project from the global Python installation and other projects. This isolation helps avoid conflicts between different projects that might rely on different package versions or have conflicting dependencies.\n",
77 | "\n",
78 | "- **Package Manager**: A package manager is a tool that simplifies the process of installing, updating, and removing packages within a specific environment. It keeps track of package versions and ensures that the required packages are available to the project when needed."
79 | ]
80 | },
81 | {
82 | "cell_type": "markdown",
83 | "metadata": {},
84 | "source": [
85 | "## [Scenario: Two People Creating Conda Environments](#toc0_)"
86 | ]
87 | },
88 | {
89 | "cell_type": "markdown",
90 | "metadata": {},
91 | "source": [
92 | "Now, let's relate this to our scenario with Person #1 and Person #2:\n",
93 | "\n",
94 | "- Person #1 has developed a Python code for a project that relies on specific packages (Python, tensorflow, sklearn, and numpy). To ensure their code runs without any issues, they use Conda, a popular package manager, to create a separate environment.\n",
95 | "\n",
96 | "- Person #2 also has the code, but they don't use Conda or have the same packages installed as Person #1."
97 | ]
98 | },
99 | {
100 | "cell_type": "markdown",
101 | "metadata": {},
102 | "source": [
103 | "
"
104 | ]
105 | },
106 | {
107 | "cell_type": "markdown",
108 | "metadata": {},
109 | "source": [
110 | "\n",
111 | "In our scenario with Person #1 and Person #2, Person #1 uses Conda as the package manager for their Python project. Here's how Conda helps:\n",
112 | "\n",
113 | "- **Person #1's Computer (Conda Environment)**: Person #1 creates a Conda environment specifically for their project. Within this environment, Conda ensures that the required packages (tensorflow, sklearn, and numpy) are installed with the correct versions. This isolation guarantees that Person #1's code runs smoothly and consistently, regardless of other packages installed on their computer.\n",
114 | "\n",
115 | "- **Person #2's Computer (Non-Conda Environment)**: Person #2 doesn't use Conda and might have a different set of packages installed, including Package_A. When they try to run Person #1's code without setting up a similar environment, issues arise. The code may fail due to missing dependencies (no tensorflow and wrong version for numpy) that are required for the code to work correctly."
116 | ]
117 | },
118 | {
119 | "cell_type": "markdown",
120 | "metadata": {},
121 | "source": [
122 | "By using Conda and environments, Python developers achieve code **portability** and **reproducibility**. Portability means that the code can be easily shared and run on different computers, as long as the recipient sets up the same Conda environment. Reproducibility ensures that the code will behave consistently over time, even if package versions change, as Conda keeps track of dependencies and versions within the environment."
123 | ]
124 | },
125 | {
126 | "cell_type": "markdown",
127 | "metadata": {},
128 | "source": [
129 | "## [Benefits of Using a Package Manager](#toc0_)"
130 | ]
131 | },
132 | {
133 | "cell_type": "markdown",
134 | "metadata": {},
135 | "source": [
136 | "
"
137 | ]
138 | },
139 | {
140 | "cell_type": "markdown",
141 | "metadata": {},
142 | "source": [
143 | "\n",
144 | "A package manager, such as Conda, provides several benefits for Python development:\n"
145 | ]
146 | },
147 | {
148 | "cell_type": "markdown",
149 | "metadata": {},
150 | "source": [
151 | "\n",
152 | "1. **Dependency management**: Package managers handle the installation, upgrading, and removal of packages and their dependencies. This eliminates the need to manually manage complex dependency chains, ensuring that your project's dependencies are correctly installed and compatible with each other.\n",
153 | "\n",
154 | "2. **Environment isolation**: With Conda, you can create isolated environments, also known as virtual environments, for your Python projects. Each environment can have its own set of packages and dependencies, enabling you to work on different projects with varying requirements without conflicts.\n",
155 | "\n",
156 | "3. **Reproducibility**: By specifying the exact versions of packages in your Conda environment, you can ensure that your project can be reproduced in the future. This is particularly useful when sharing code with others or when deploying your project on different machines.\n"
157 | ]
158 | },
159 | {
160 | "cell_type": "markdown",
161 | "metadata": {},
162 | "source": [
163 | "While there are other Python package managers like `pip` and `poetry`, which is the standard package manager for Python, and other specialized package managers for specific use cases, we've selected Conda for its robust features, strong dependency management, and extensive support for scientific computing and data science projects."
164 | ]
165 | },
166 | {
167 | "cell_type": "markdown",
168 | "metadata": {},
169 | "source": [
170 | "By installing Miniconda and leveraging the power of Conda, you will have a robust package manager at your disposal. Later, we will use Conda to install Python and required packages, enabling you to create a tailored and efficient Python development environment.\n"
171 | ]
172 | }
173 | ],
174 | "metadata": {
175 | "kernelspec": {
176 | "display_name": "base",
177 | "language": "python",
178 | "name": "python3"
179 | },
180 | "language_info": {
181 | "name": "python",
182 | "version": "3.10.10"
183 | },
184 | "orig_nbformat": 4
185 | },
186 | "nbformat": 4,
187 | "nbformat_minor": 2
188 | }
189 |
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/11 Using Conda Environments in VS Code.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "attachments": {},
5 | "cell_type": "markdown",
6 | "metadata": {},
7 | "source": [
8 | "
"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# Using Conda Environments in VS Code\n"
16 | ]
17 | },
18 | {
19 | "cell_type": "markdown",
20 | "metadata": {},
21 | "source": [
22 | "\n",
23 | "In this section, we will explore how to leverage Conda environments within Visual Studio Code (VS Code) for Python development. Conda environments allow us to isolate our project dependencies, ensuring consistency and reproducibility across different development environments. Let's get started!\n"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {},
29 | "source": [
30 | "**Table of contents** \n",
31 | "- [Installing the VS Code Extension](#toc1_) \n",
32 | "- [Selecting a Conda Environment in VS Code](#toc2_) \n",
33 | "- [Activating a Conda Environment in the Integrated Terminal](#toc3_) \n",
34 | "\n",
35 | "\n",
42 | ""
43 | ]
44 | },
45 | {
46 | "cell_type": "markdown",
47 | "metadata": {},
48 | "source": [
49 | "\n",
50 | "## [Installing the VS Code Extension](#toc0_)\n"
51 | ]
52 | },
53 | {
54 | "cell_type": "markdown",
55 | "metadata": {},
56 | "source": [
57 | "\n",
58 | "Before we begin, make sure you have Visual Studio Code installed on your machine. Once you have VS Code installed, follow these steps to install the necessary extension for working with Conda environments:\n",
59 | "\n",
60 | "1. Launch VS Code.\n",
61 | "2. Go to the Extensions view by clicking on the square icon in the left sidebar or using the shortcut `Ctrl+Shift+X`.\n",
62 | "3. In the search bar, type \"Python\" and press Enter.\n",
63 | "4. Look for the \"Python\" extension by Microsoft and click on the \"Install\" button.\n"
64 | ]
65 | },
66 | {
67 | "cell_type": "markdown",
68 | "metadata": {},
69 | "source": [
70 | "
"
71 | ]
72 | },
73 | {
74 | "cell_type": "markdown",
75 | "metadata": {},
76 | "source": [
77 | "\n",
78 | "## [Selecting a Conda Environment in VS Code](#toc0_)\n"
79 | ]
80 | },
81 | {
82 | "cell_type": "markdown",
83 | "metadata": {},
84 | "source": [
85 | "Once you have the Python extension installed, you can choose the desired Conda environment for your project within VS Code. When selecting an interpreter, you will see a list of available interpreters, including both global and Conda interpreters, depending on the environment managers you have chosen to work with.\n",
86 | "\n",
87 | "- **Global Interpreters:** These interpreters are the ones that come pre-installed with your operating system. They are shared across all projects and are typically located in standard system directories.\n",
88 | "\n",
89 | "- **Conda Interpreters:** These interpreters are created by Conda, a popular package and environment manager for Python. Conda environments allow us to isolate our project dependencies, ensuring consistency and reproducibility across different development environments."
90 | ]
91 | },
92 | {
93 | "cell_type": "markdown",
94 | "metadata": {},
95 | "source": [
96 | "\n",
97 | "Here's how to choose the interpreter for your project:\n",
98 | "\n",
99 | "1. Open your Python project in VS Code.\n",
100 | "2. At the bottom right corner of the window, click on the Python interpreter version. It may display the default interpreter or another interpreter you previously selected.\n",
101 | "3. In the list that appears, select an interpreter from the list or select \"Enter interpreter path...\" to enter the path to a specific interpreter. If selected, you will be prompted to enter the path to the desired interpreter. For example, if you are using Anaconda on Linux, the path to the base environment would be `/home//anaconda3/bin/python`:\n",
102 | " - Choose the \"Find...\" option.\n",
103 | " - Search for the Conda environment you want to use, typically located in the `envs` directory within your Anaconda installation directory.\n",
104 | "4. Select the desired interpreter from the list, whether it's a global interpreter that came with your operating system or a Conda interpreter you created for this project.\n"
105 | ]
106 | },
107 | {
108 | "cell_type": "markdown",
109 | "metadata": {},
110 | "source": [
111 | "
"
112 | ]
113 | },
114 | {
115 | "cell_type": "markdown",
116 | "metadata": {},
117 | "source": [
118 | "
"
119 | ]
120 | },
121 | {
122 | "cell_type": "markdown",
123 | "metadata": {},
124 | "source": [
125 | "\n",
126 | "Once you select an interpreter, VS Code will use that environment for executing Python code and managing dependencies within your project.\n"
127 | ]
128 | },
129 | {
130 | "cell_type": "markdown",
131 | "metadata": {},
132 | "source": [
133 | "\n",
134 | "This way, you can easily switch between different interpreters, enabling you to work on various projects with different dependencies and Python versions.\n"
135 | ]
136 | },
137 | {
138 | "cell_type": "markdown",
139 | "metadata": {},
140 | "source": [
141 | "\n",
142 | "## [Activating a Conda Environment in the Integrated Terminal](#toc0_)\n"
143 | ]
144 | },
145 | {
146 | "cell_type": "markdown",
147 | "metadata": {},
148 | "source": [
149 | "\n",
150 | "To activate the selected Conda environment within the integrated terminal in VS Code, follow these steps:\n",
151 | "\n",
152 | "1. Open the integrated terminal in VS Code by selecting \"View\" -> \"Terminal\" or using the shortcut `Ctrl+` backtick (`).\n",
153 | "2. In the terminal, you will see the current Conda environment name displayed on the left side of the command prompt (e.g., `(myenv) user@machine:~$`).\n",
154 | "3. If the correct Conda environment is not activated, use the following command to activate it:\n",
155 | "```bash\n",
156 | "conda activate myenv\n",
157 | "```"
158 | ]
159 | },
160 | {
161 | "cell_type": "markdown",
162 | "metadata": {},
163 | "source": [
164 | "
"
165 | ]
166 | }
167 | ],
168 | "metadata": {
169 | "language_info": {
170 | "name": "python"
171 | },
172 | "orig_nbformat": 4
173 | },
174 | "nbformat": 4,
175 | "nbformat_minor": 2
176 | }
177 |
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/00-conda-download-mac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/00-conda-download-mac.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/00-conda-download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/00-conda-download.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/01-conda-install-start-mac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/01-conda-install-start-mac.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/01-conda-install-start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/01-conda-install-start.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/02-conda-license-skip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/02-conda-license-skip.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/03-conda-license.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/03-conda-license.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/04-conda-installation-path.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/04-conda-installation-path.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/05-init-conda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/05-init-conda.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/06-conda-setup-finished.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/06-conda-setup-finished.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/07-conda-version.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/07-conda-version.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/1-show-python-interpreter-list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/1-show-python-interpreter-list.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/1-vscode-jupyter-select-kernel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/1-vscode-jupyter-select-kernel.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/2-select-python-interpreter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/2-select-python-interpreter.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/2-vscode-jupyter-select-env.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/2-vscode-jupyter-select-env.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/3-vscode-jupyter-env-list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/3-vscode-jupyter-env-list.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/4-vscode-jupyter-run-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/4-vscode-jupyter-run-code.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/banner.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/conda-activate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/conda-activate.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/conda-environments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/conda-environments.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/conda-miniconda-anaconda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/conda-miniconda-anaconda.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/conda-pip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/conda-pip.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/conda-python.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/conda-python.jpg
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/how-conda-works.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/how-conda-works.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/jupyter-notebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/jupyter-notebook.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/jupyterlab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/jupyterlab.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/notebook-vscode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/notebook-vscode.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/os-mac.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/os-mac.jpg
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/os-ubuntu.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/os-ubuntu.webp
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/os-wsl.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/os-wsl.webp
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/pip.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/pip.webp
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/pypi-pip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/pypi-pip.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/python-ecosystem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/python-ecosystem.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/python-vscode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/python-vscode.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/terminal-mac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/terminal-mac.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/terminal-ubuntu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/terminal-ubuntu.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/terminal-wsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/terminal-wsl.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/unix-file-system.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/unix-file-system.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/vscode-install-linux.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/vscode-install-linux.webp
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/vscode-install-path-mac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/vscode-install-path-mac.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/vscode-install-wsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/vscode-install-wsl.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/vscode-jupyter-ext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/vscode-jupyter-ext.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/vscode-python-ext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/vscode-python-ext.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/vscode-terminal-env.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/vscode-terminal-env.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/windows-os.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/windows-os.webp
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/wsl-starting-notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/wsl-starting-notification.png
--------------------------------------------------------------------------------
/Lectures/02 Python Setup/images/wsl-statusbar-indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/02 Python Setup/images/wsl-statusbar-indicator.png
--------------------------------------------------------------------------------
/Lectures/03 Getting Started/01 How to Download Source Code.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "**Table of contents** \n",
15 | "- [Method 1: Using the Download Button](#toc1_) \n",
16 | " - [Step 1: Download the Repository ZIP](#toc1_1_) \n",
17 | " - [Step 2: Extract the ZIP](#toc1_2_) \n",
18 | "- [Step 3: Open the Project in VS Code](#toc2_) \n",
19 | "- [Method 2: Using Git](#toc3_) \n",
20 | " - [Step 1: Install Git (if not already installed)](#toc3_1_) \n",
21 | " - [Step 2: Clone the Repository](#toc3_2_) \n",
22 | " - [Step 3: Update the Repository](#toc3_3_) \n",
23 | " - [Refreshing Files:](#toc3_4_) \n",
24 | "\n",
25 | "\n",
32 | ""
33 | ]
34 | },
35 | {
36 | "cell_type": "markdown",
37 | "metadata": {},
38 | "source": [
39 | "## [Method 1: Using the Download Button](#toc0_)"
40 | ]
41 | },
42 | {
43 | "cell_type": "markdown",
44 | "metadata": {},
45 | "source": [
46 | "\n",
47 | "### [Step 1: Download the Repository ZIP](#toc0_)\n",
48 | "\n",
49 | "1. **Open Your Web Browser** and navigate to the repository you want to download.\n",
50 | "\n",
51 | "2. **Click on \"Code\" Button**\n",
52 | "\n",
53 | "3. **Click \"Download ZIP\"** to download the repository as a ZIP file.\n"
54 | ]
55 | },
56 | {
57 | "cell_type": "markdown",
58 | "metadata": {},
59 | "source": [
60 | "
"
61 | ]
62 | },
63 | {
64 | "cell_type": "markdown",
65 | "metadata": {},
66 | "source": [
67 | "\n",
68 | "### [Step 2: Extract the ZIP](#toc0_)\n",
69 | "\n",
70 | "1. **Navigate to Downloads** or wherever your browser saves downloaded files.\n",
71 | "\n",
72 | "2. **Extract ZIP** by double clicking on the file. This will create a folder with the same name as the ZIP file.\n"
73 | ]
74 | },
75 | {
76 | "cell_type": "markdown",
77 | "metadata": {},
78 | "source": [
79 | "## [Step 3: Open the Project in VS Code](#toc0_)\n",
80 | "\n",
81 | "1. **Open the Terminal** in VS Code by clicking on \"Terminal\" in the top menu and then \"New Terminal\".\n",
82 | "2. **Navigate to the folder** you just extracted and click \"Open\".\n",
83 | "3. Open the project in VS Code by typing `code .` in the terminal and pressing enter."
84 | ]
85 | },
86 | {
87 | "cell_type": "markdown",
88 | "metadata": {},
89 | "source": [
90 | "## [Method 2: Using Git](#toc0_)\n"
91 | ]
92 | },
93 | {
94 | "cell_type": "markdown",
95 | "metadata": {},
96 | "source": [
97 | "\n",
98 | "### [Step 1: Install Git (if not already installed)](#toc0_)\n",
99 | "\n",
100 | "1. **Mac:**\n",
101 | " - Open Terminal.\n",
102 | " - Check if Git is installed: `git --version`\n",
103 | " - If not installed, you'll be prompted to install the Xcode Command Line Tools.\n",
104 | "\n",
105 | "2. **Linux:**\n",
106 | " - Open Terminal.\n",
107 | " - Check if Git is installed: `git --version`\n",
108 | " - If not installed, use your package manager to install Git. For example, on Debian-based systems: `sudo apt-get install git`\n",
109 | "\n",
110 | "3. **WSL:**\n",
111 | " - Open your WSL terminal.\n",
112 | " - Check if Git is installed: `git --version`\n",
113 | " - If not installed, use your Linux package manager to install Git by following the Linux instructions above.\n"
114 | ]
115 | },
116 | {
117 | "cell_type": "markdown",
118 | "metadata": {},
119 | "source": [
120 | "\n",
121 | "### [Step 2: Clone the Repository](#toc0_)\n",
122 | "\n",
123 | "1. **Open Terminal (Mac and Linux) or Command Prompt (WSL)**\n",
124 | "\n",
125 | "2. **Navigate to Desired Directory**\n",
126 | "\n",
127 | "3. **Open Your Web Browser** and navigate to the repository you want to clone.\n",
128 | "\n",
129 | "4. **Click on \"Code\" Button** and copy the URL.\n",
130 | "\n",
131 | "5. **Clone the Repository** by typing `git clone ` in the terminal and pressing enter. Replace `` with the URL you copied in the previous step.\n",
132 | "\n",
133 | "6. `cd` into the repository by typing `cd ` and pressing enter. Replace `` with the name of the repository you just cloned.\n",
134 | "\n",
135 | "7. Open the project in VS Code by typing `code .` in the terminal and pressing enter."
136 | ]
137 | },
138 | {
139 | "cell_type": "markdown",
140 | "metadata": {},
141 | "source": [
142 | "\n",
143 | "### [Step 3: Update the Repository](#toc0_)\n",
144 | "\n",
145 | "1. **Navigate to Repository Directory**\n",
146 | "\n",
147 | "2. **Pull Changes**: `git pull origin main`\n"
148 | ]
149 | },
150 | {
151 | "cell_type": "markdown",
152 | "metadata": {},
153 | "source": [
154 | "\n",
155 | "### [Refreshing Files:](#toc0_)\n",
156 | "\n",
157 | "If you want to refresh the files using the Download button method, you can follow these steps:\n",
158 | "\n",
159 | "1. **Download ZIP Again:** Repeat the steps in \"Step 1: Download the Repository ZIP\" to download the ZIP file again.\n",
160 | "\n",
161 | "2. **Extract ZIP:** Repeat the steps in \"Step 2: Extract the ZIP\" to extract the newly downloaded ZIP file.\n",
162 | "\n",
163 | "By downloading and extracting the ZIP file again, you'll get the latest version of the repository's contents.\n"
164 | ]
165 | }
166 | ],
167 | "metadata": {
168 | "language_info": {
169 | "name": "python"
170 | },
171 | "orig_nbformat": 4
172 | },
173 | "nbformat": 4,
174 | "nbformat_minor": 2
175 | }
176 |
--------------------------------------------------------------------------------
/Lectures/03 Getting Started/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/03 Getting Started/images/banner.png
--------------------------------------------------------------------------------
/Lectures/03 Getting Started/images/download-source-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/03 Getting Started/images/download-source-code.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/10 String Formatting.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "# String Formatting"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "Every developer reaches a point where simply printing data isn't enough. We want our output to be informative, structured, and, sometimes, even aesthetically pleasing. To achieve this, Python offers various ways to format strings, ensuring that the information we present is clear and easy to understand. This section will dive deep into the art of string formatting in Python."
22 | ]
23 | },
24 | {
25 | "cell_type": "markdown",
26 | "metadata": {},
27 | "source": [
28 | "**Table of contents** \n",
29 | "- [Introduction to String Formatting](#toc1_) \n",
30 | "- [The `.format()` Method](#toc2_) \n",
31 | "- [Introducing f-strings](#toc3_) \n",
32 | "- [Comparing .format() and f-strings](#toc4_) \n",
33 | "- [Conclusion](#toc5_) \n",
34 | "\n",
35 | "\n",
42 | ""
43 | ]
44 | },
45 | {
46 | "cell_type": "markdown",
47 | "metadata": {},
48 | "source": [
49 | "## [Introduction to String Formatting](#toc0_)"
50 | ]
51 | },
52 | {
53 | "cell_type": "markdown",
54 | "metadata": {},
55 | "source": [
56 | "In the world of programming, string formatting means to substitute values into a base string at specific locations. Suppose you have a sentence like \"I bought _ apples.\" and you want to replace the _ with the number of apples you bought. String formatting makes this task easy."
57 | ]
58 | },
59 | {
60 | "cell_type": "markdown",
61 | "metadata": {},
62 | "source": [
63 | "Python has introduced several methods over the years to format strings. Let's explore them."
64 | ]
65 | },
66 | {
67 | "cell_type": "markdown",
68 | "metadata": {},
69 | "source": [
70 | "## [The `.format()` Method](#toc0_)"
71 | ]
72 | },
73 | {
74 | "cell_type": "markdown",
75 | "metadata": {},
76 | "source": [
77 | "Before the introduction of f-strings in Python 3.6, the `.format()` method was a widely used technique for string formatting. It provided a way to embed expressions inside string literals."
78 | ]
79 | },
80 | {
81 | "cell_type": "markdown",
82 | "metadata": {},
83 | "source": [
84 | "**Basic Usage**:"
85 | ]
86 | },
87 | {
88 | "cell_type": "code",
89 | "execution_count": 2,
90 | "metadata": {},
91 | "outputs": [],
92 | "source": [
93 | "greeting = \"Hello, {}\"\n",
94 | "name = \"Alice\""
95 | ]
96 | },
97 | {
98 | "cell_type": "code",
99 | "execution_count": 3,
100 | "metadata": {},
101 | "outputs": [
102 | {
103 | "data": {
104 | "text/plain": [
105 | "'Hello, Alice'"
106 | ]
107 | },
108 | "execution_count": 3,
109 | "metadata": {},
110 | "output_type": "execute_result"
111 | }
112 | ],
113 | "source": [
114 | "greeting.format(name)"
115 | ]
116 | },
117 | {
118 | "cell_type": "markdown",
119 | "metadata": {},
120 | "source": [
121 | "**Named Placeholders**:"
122 | ]
123 | },
124 | {
125 | "cell_type": "markdown",
126 | "metadata": {},
127 | "source": [
128 | "You can also use named placeholders for better clarity, especially when dealing with multiple parameters:"
129 | ]
130 | },
131 | {
132 | "cell_type": "code",
133 | "execution_count": 6,
134 | "metadata": {},
135 | "outputs": [],
136 | "source": [
137 | "template = 'Hey {name}, are you {age} years old?'"
138 | ]
139 | },
140 | {
141 | "cell_type": "code",
142 | "execution_count": 10,
143 | "metadata": {},
144 | "outputs": [
145 | {
146 | "data": {
147 | "text/plain": [
148 | "'Hey Hamidreza, are you 30 years old?'"
149 | ]
150 | },
151 | "execution_count": 10,
152 | "metadata": {},
153 | "output_type": "execute_result"
154 | }
155 | ],
156 | "source": [
157 | "template.format(name=\"Hamidreza\", age=30)"
158 | ]
159 | },
160 | {
161 | "cell_type": "markdown",
162 | "metadata": {},
163 | "source": [
164 | "This method is versatile as it allows placeholders to be rearranged, providing flexibility in constructing strings."
165 | ]
166 | },
167 | {
168 | "cell_type": "markdown",
169 | "metadata": {},
170 | "source": [
171 | "## [Introducing f-strings](#toc0_)"
172 | ]
173 | },
174 | {
175 | "cell_type": "markdown",
176 | "metadata": {},
177 | "source": [
178 | "With Python 3.6, a new string formatting mechanism was introduced, called \"formatted string literals\", or more commonly referred to as f-strings. They lead with an `f` or `F` before the string and allow you to embed expressions inside `{}` braces."
179 | ]
180 | },
181 | {
182 | "cell_type": "markdown",
183 | "metadata": {},
184 | "source": [
185 | "**Basic Usage**:"
186 | ]
187 | },
188 | {
189 | "cell_type": "code",
190 | "execution_count": 12,
191 | "metadata": {},
192 | "outputs": [
193 | {
194 | "data": {
195 | "text/plain": [
196 | "'My name is Hamidreza and I am 22 years old.'"
197 | ]
198 | },
199 | "execution_count": 12,
200 | "metadata": {},
201 | "output_type": "execute_result"
202 | }
203 | ],
204 | "source": [
205 | "name = \"Hamidreza\"\n",
206 | "age = 22\n",
207 | "f\"My name is {name} and I am {age} years old.\""
208 | ]
209 | },
210 | {
211 | "cell_type": "markdown",
212 | "metadata": {},
213 | "source": [
214 | "**Calculations Inside f-strings**:"
215 | ]
216 | },
217 | {
218 | "cell_type": "markdown",
219 | "metadata": {},
220 | "source": [
221 | "One of the coolest features of f-strings is the ability to embed Python expressions inside the placeholders:"
222 | ]
223 | },
224 | {
225 | "cell_type": "code",
226 | "execution_count": 13,
227 | "metadata": {},
228 | "outputs": [
229 | {
230 | "data": {
231 | "text/plain": [
232 | "'In ten years, Hamidreza will be 32 years old.'"
233 | ]
234 | },
235 | "execution_count": 13,
236 | "metadata": {},
237 | "output_type": "execute_result"
238 | }
239 | ],
240 | "source": [
241 | "f\"In ten years, {name} will be {age + 10} years old.\""
242 | ]
243 | },
244 | {
245 | "cell_type": "markdown",
246 | "metadata": {},
247 | "source": [
248 | "## [Comparing .format() and f-strings](#toc0_)"
249 | ]
250 | },
251 | {
252 | "cell_type": "markdown",
253 | "metadata": {},
254 | "source": [
255 | "- **Conciseness**: f-strings offer a more concise way to embed expressions inside strings compared to the `.format()` method.\n",
256 | "- **Readability**: With f-strings, what you see is what you get. The embedded expressions inside the placeholders make it very readable.\n",
257 | "- **Performance**: f-strings are faster than the `.format() `method because they are evaluated at runtime.\n",
258 | "- **Version Limitation**: f-strings are available only in Python 3.6 and later. If you're working with earlier versions, you'll need to rely on the `.format()` method or other older techniques."
259 | ]
260 | },
261 | {
262 | "cell_type": "markdown",
263 | "metadata": {},
264 | "source": [
265 | "## [Conclusion](#toc0_)"
266 | ]
267 | },
268 | {
269 | "cell_type": "markdown",
270 | "metadata": {},
271 | "source": [
272 | "String formatting is essential in creating meaningful and user-friendly outputs. Whether you choose to use the `.format()` method or the newer f-strings, Python offers powerful tools to ensure your data is presented in the best way possible. As you continue your Python journey, you'll find more cases where these techniques come in handy, enhancing the overall functionality and user experience of your programs."
273 | ]
274 | }
275 | ],
276 | "metadata": {
277 | "kernelspec": {
278 | "display_name": "py38",
279 | "language": "python",
280 | "name": "python3"
281 | },
282 | "language_info": {
283 | "codemirror_mode": {
284 | "name": "ipython",
285 | "version": 3
286 | },
287 | "file_extension": ".py",
288 | "mimetype": "text/x-python",
289 | "name": "python",
290 | "nbconvert_exporter": "python",
291 | "pygments_lexer": "ipython3",
292 | "version": "3.8.11"
293 | },
294 | "orig_nbformat": 4
295 | },
296 | "nbformat": 4,
297 | "nbformat_minor": 2
298 | }
299 |
--------------------------------------------------------------------------------
/Lectures/04 Data Types/11 Escape Sequences and Raw Strings.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "# Escape Sequences and Raw Strings"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "In programming, and especially in string manipulation, there will be times when you want to include characters that either have a special meaning in strings or are not directly typable on a keyboard. Python, like most languages, provides escape sequences to represent these characters. In this section, we'll delve into the world of escape sequences and learn about raw strings, which treat backslashes as literal characters."
22 | ]
23 | },
24 | {
25 | "cell_type": "markdown",
26 | "metadata": {},
27 | "source": [
28 | "**Table of contents** \n",
29 | "- [Escape Sequences](#toc1_) \n",
30 | "- [Raw Strings](#toc2_) \n",
31 | " - [Practical Example: File Paths](#toc2_1_) \n",
32 | "- [Conclusion](#toc3_) \n",
33 | "\n",
34 | "\n",
41 | ""
42 | ]
43 | },
44 | {
45 | "cell_type": "markdown",
46 | "metadata": {},
47 | "source": [
48 | "## [Escape Sequences](#toc0_)"
49 | ]
50 | },
51 | {
52 | "cell_type": "markdown",
53 | "metadata": {},
54 | "source": [
55 | "Escape sequences allow you to include special characters in strings. To denote an escape sequence, Python uses the backslash (`\\`) followed by another character.\n",
56 | "\n",
57 | "Here are some common escape sequences:\n",
58 | "\n",
59 | "- `\\\\` : Backslash (`\\`)\n",
60 | "- `\\'` : Single quote (`'`)\n",
61 | "- `\\\"` : Double quote (`\"`)\n",
62 | "- `\\n` : Newline\n",
63 | "- `\\t` : Tab"
64 | ]
65 | },
66 | {
67 | "cell_type": "markdown",
68 | "metadata": {},
69 | "source": [
70 | "**Examples**:\n",
71 | "\n",
72 | "Using a double quote inside a string enclosed by double quotes:"
73 | ]
74 | },
75 | {
76 | "cell_type": "code",
77 | "execution_count": 1,
78 | "metadata": {},
79 | "outputs": [
80 | {
81 | "data": {
82 | "text/plain": [
83 | "'He said, \"Python is amazing!\"'"
84 | ]
85 | },
86 | "execution_count": 1,
87 | "metadata": {},
88 | "output_type": "execute_result"
89 | }
90 | ],
91 | "source": [
92 | "\"He said, \\\"Python is amazing!\\\"\""
93 | ]
94 | },
95 | {
96 | "cell_type": "code",
97 | "execution_count": 5,
98 | "metadata": {},
99 | "outputs": [
100 | {
101 | "data": {
102 | "text/plain": [
103 | "'First Line\\nSecond Line'"
104 | ]
105 | },
106 | "execution_count": 5,
107 | "metadata": {},
108 | "output_type": "execute_result"
109 | }
110 | ],
111 | "source": [
112 | "# Note that \\n is not interpreted as a new line\n",
113 | "# This is because the \\n is interpreted as a raw string\n",
114 | "# To interpret the \\n as a new line, use a print statement\n",
115 | "# You will learn more about the difference later\n",
116 | "\"First Line\\nSecond Line\""
117 | ]
118 | },
119 | {
120 | "cell_type": "code",
121 | "execution_count": 4,
122 | "metadata": {},
123 | "outputs": [
124 | {
125 | "name": "stdout",
126 | "output_type": "stream",
127 | "text": [
128 | "First Line\n",
129 | "Second Line\n"
130 | ]
131 | }
132 | ],
133 | "source": [
134 | "print(\"First Line\\nSecond Line\")"
135 | ]
136 | },
137 | {
138 | "cell_type": "markdown",
139 | "metadata": {},
140 | "source": [
141 | "Using a tab:"
142 | ]
143 | },
144 | {
145 | "cell_type": "code",
146 | "execution_count": 6,
147 | "metadata": {},
148 | "outputs": [
149 | {
150 | "name": "stdout",
151 | "output_type": "stream",
152 | "text": [
153 | "Start\tMiddle\tEnd\n"
154 | ]
155 | }
156 | ],
157 | "source": [
158 | "print(\"Start\\tMiddle\\tEnd\")"
159 | ]
160 | },
161 | {
162 | "cell_type": "markdown",
163 | "metadata": {},
164 | "source": [
165 | "## [Raw Strings](#toc0_)"
166 | ]
167 | },
168 | {
169 | "cell_type": "markdown",
170 | "metadata": {},
171 | "source": [
172 | "Sometimes, you might want to include a backslash in a string without triggering an escape sequence. This can be especially useful when working with regular expressions, file paths, etc. Python provides \"raw strings\" for this purpose.\n",
173 | "\n",
174 | "To create a raw string, prefix your string with the letter `r` or `R`."
175 | ]
176 | },
177 | {
178 | "cell_type": "markdown",
179 | "metadata": {},
180 | "source": [
181 | "**Examples**:\n",
182 | "\n",
183 | "A normal string with escape sequences:"
184 | ]
185 | },
186 | {
187 | "cell_type": "code",
188 | "execution_count": 16,
189 | "metadata": {},
190 | "outputs": [
191 | {
192 | "name": "stdout",
193 | "output_type": "stream",
194 | "text": [
195 | "This is a backslash: \\\n"
196 | ]
197 | }
198 | ],
199 | "source": [
200 | "print(\"This is a backslash: \\\\\")"
201 | ]
202 | },
203 | {
204 | "cell_type": "markdown",
205 | "metadata": {},
206 | "source": [
207 | "Using a raw string:"
208 | ]
209 | },
210 | {
211 | "cell_type": "code",
212 | "execution_count": 13,
213 | "metadata": {},
214 | "outputs": [
215 | {
216 | "name": "stdout",
217 | "output_type": "stream",
218 | "text": [
219 | "This is a backslash: \\\\\n"
220 | ]
221 | }
222 | ],
223 | "source": [
224 | "print(r\"This is a backslash: \\\\\")"
225 | ]
226 | },
227 | {
228 | "cell_type": "markdown",
229 | "metadata": {},
230 | "source": [
231 | "Notice how the raw string treats every character literally, including the backslashes."
232 | ]
233 | },
234 | {
235 | "cell_type": "markdown",
236 | "metadata": {},
237 | "source": [
238 | "### [Practical Example: File Paths](#toc0_)"
239 | ]
240 | },
241 | {
242 | "cell_type": "markdown",
243 | "metadata": {},
244 | "source": [
245 | "When specifying file paths, especially on Windows, raw strings can be very useful."
246 | ]
247 | },
248 | {
249 | "cell_type": "markdown",
250 | "metadata": {},
251 | "source": [
252 | "Consider a file path: `C:\\Users\\Bob\\Documents`"
253 | ]
254 | },
255 | {
256 | "cell_type": "markdown",
257 | "metadata": {},
258 | "source": [
259 | "Using a normal string:"
260 | ]
261 | },
262 | {
263 | "cell_type": "code",
264 | "execution_count": 17,
265 | "metadata": {},
266 | "outputs": [
267 | {
268 | "name": "stdout",
269 | "output_type": "stream",
270 | "text": [
271 | "C:\\Users\\Bob\\Documents\n"
272 | ]
273 | }
274 | ],
275 | "source": [
276 | "path = \"C:\\\\Users\\\\Bob\\\\Documents\"\n",
277 | "print(path)"
278 | ]
279 | },
280 | {
281 | "cell_type": "markdown",
282 | "metadata": {},
283 | "source": [
284 | "Using a raw string:"
285 | ]
286 | },
287 | {
288 | "cell_type": "code",
289 | "execution_count": 18,
290 | "metadata": {},
291 | "outputs": [
292 | {
293 | "name": "stdout",
294 | "output_type": "stream",
295 | "text": [
296 | "C:\\Users\\Bob\\Documents\n"
297 | ]
298 | }
299 | ],
300 | "source": [
301 | "path = r\"C:\\Users\\Bob\\Documents\"\n",
302 | "print(path)"
303 | ]
304 | },
305 | {
306 | "cell_type": "markdown",
307 | "metadata": {},
308 | "source": [
309 | "Both outputs will be the same, but the raw string version is clearer and easier to read."
310 | ]
311 | },
312 | {
313 | "cell_type": "markdown",
314 | "metadata": {},
315 | "source": [
316 | "## [Conclusion](#toc0_)"
317 | ]
318 | },
319 | {
320 | "cell_type": "markdown",
321 | "metadata": {},
322 | "source": [
323 | "Understanding escape sequences is crucial when dealing with strings that require special characters. Raw strings, on the other hand, simplify the representation of strings that have a lot of backslashes. They are especially useful in scenarios like regular expressions and file paths. By mastering these concepts, you can handle strings in Python with greater flexibility and precision."
324 | ]
325 | }
326 | ],
327 | "metadata": {
328 | "kernelspec": {
329 | "display_name": "py38",
330 | "language": "python",
331 | "name": "python3"
332 | },
333 | "language_info": {
334 | "codemirror_mode": {
335 | "name": "ipython",
336 | "version": 3
337 | },
338 | "file_extension": ".py",
339 | "mimetype": "text/x-python",
340 | "name": "python",
341 | "nbconvert_exporter": "python",
342 | "pygments_lexer": "ipython3",
343 | "version": "3.8.11"
344 | },
345 | "orig_nbformat": 4
346 | },
347 | "nbformat": 4,
348 | "nbformat_minor": 2
349 | }
350 |
--------------------------------------------------------------------------------
/Lectures/04 Data Types/12 Composite Data Types.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "# Composite Data Types"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "In Python, we have several composite (or compound) data types that are used to group together other values. The versatility of these data types makes them very beneficial for handling various kinds of data structures, which we utilize in our everyday programming. The main types of composite data structures provided by Python are lists, tuples, sets, and dictionaries.\n"
22 | ]
23 | },
24 | {
25 | "cell_type": "markdown",
26 | "metadata": {},
27 | "source": [
28 | "
"
29 | ]
30 | },
31 | {
32 | "cell_type": "markdown",
33 | "metadata": {},
34 | "source": [
35 | "## 1. List\n",
36 | "Lists are the most versatile compound data types in Python. They are similar to arrays in other programming languages but have more extensive functionality. A list can contain objects of different types (integers, strings, other lists, etc.) and is defined by enclosing the values (items) between square brackets `[]`, separated by commas.\n"
37 | ]
38 | },
39 | {
40 | "cell_type": "code",
41 | "execution_count": 1,
42 | "metadata": {},
43 | "outputs": [
44 | {
45 | "data": {
46 | "text/plain": [
47 | "[1, 2, 'Python', 4.0, [3, 4]]"
48 | ]
49 | },
50 | "execution_count": 1,
51 | "metadata": {},
52 | "output_type": "execute_result"
53 | }
54 | ],
55 | "source": [
56 | "[1, 2, \"Python\", 4.0, [3, 4]]"
57 | ]
58 | },
59 | {
60 | "cell_type": "markdown",
61 | "metadata": {},
62 | "source": [
63 | "## 2. Tuples\n",
64 | "Tuples are like lists, but they are immutable, which signifies they cannot be changed after creation. It's beneficial when we want a set of constants that belong together and should not be altered. Tuples are presented by rounded brackets `()`.\n"
65 | ]
66 | },
67 | {
68 | "cell_type": "code",
69 | "execution_count": 2,
70 | "metadata": {},
71 | "outputs": [
72 | {
73 | "data": {
74 | "text/plain": [
75 | "(1, 2, 'Python', 4.0, (3, 4))"
76 | ]
77 | },
78 | "execution_count": 2,
79 | "metadata": {},
80 | "output_type": "execute_result"
81 | }
82 | ],
83 | "source": [
84 | "(1, 2, \"Python\", 4.0, (3, 4))"
85 | ]
86 | },
87 | {
88 | "cell_type": "markdown",
89 | "metadata": {},
90 | "source": [
91 | "## 3. Sets"
92 | ]
93 | },
94 | {
95 | "cell_type": "markdown",
96 | "metadata": {},
97 | "source": [
98 | "\n",
99 | "Sets are an unordered collection of unique elements without duplicates. They are mutable, but they can only contain immutable Python objects as elements. You can perform operations like union, intersection, and difference on sets, similar to mathematical sets. Sets are represented with curly brackets `{}`.\n"
100 | ]
101 | },
102 | {
103 | "cell_type": "code",
104 | "execution_count": 3,
105 | "metadata": {},
106 | "outputs": [
107 | {
108 | "data": {
109 | "text/plain": [
110 | "{1, 2, 4.0, 'Python'}"
111 | ]
112 | },
113 | "execution_count": 3,
114 | "metadata": {},
115 | "output_type": "execute_result"
116 | }
117 | ],
118 | "source": [
119 | "{1, 2, \"Python\", 4.0}"
120 | ]
121 | },
122 | {
123 | "cell_type": "markdown",
124 | "metadata": {},
125 | "source": [
126 | "## 4. Dictionaries"
127 | ]
128 | },
129 | {
130 | "cell_type": "markdown",
131 | "metadata": {},
132 | "source": [
133 | "Dictionaries are similar to hash tables in other programming languages. They work like associative arrays or hashes and consist of key-value pairs. A dictionary key can be most Python types, and are generally numbers or strings. Values, on the other hand, can be any arbitrary Python object. Dictionaries are defined by curly brackets `{}`, with items listed as `key: value` pairs.\n"
134 | ]
135 | },
136 | {
137 | "cell_type": "code",
138 | "execution_count": 4,
139 | "metadata": {},
140 | "outputs": [
141 | {
142 | "data": {
143 | "text/plain": [
144 | "{'name': 'Python', 'version': 3.9}"
145 | ]
146 | },
147 | "execution_count": 4,
148 | "metadata": {},
149 | "output_type": "execute_result"
150 | }
151 | ],
152 | "source": [
153 | "{\"name\": \"Python\", \"version\": 3.9}"
154 | ]
155 | },
156 | {
157 | "cell_type": "markdown",
158 | "metadata": {},
159 | "source": [
160 | "\n",
161 | "While lists, tuples, sets, and dictionaries are the fundamental composite data types in Python, the language also provides various other advanced composite data types. These include the frozenset, which is an immutable version of the set, and OrderedDict, a dictionary subclass that retains the order in which its contents are added. We also have the namedtuple, a function for creating tuple subclasses with named fields.\n"
162 | ]
163 | },
164 | {
165 | "cell_type": "markdown",
166 | "metadata": {},
167 | "source": [
168 | "\n",
169 | "These data types offer more specialized solutions for certain tasks and allow a higher level of data organization and manipulation. While they are moderately more advanced, they are built on the same principles as the basic composite types.\n"
170 | ]
171 | },
172 | {
173 | "cell_type": "markdown",
174 | "metadata": {},
175 | "source": [
176 | "\n",
177 | "In the forthcoming lectures, we will delve much deeper into each of these types. Understanding these structures will help you manage data effectively in your programs."
178 | ]
179 | }
180 | ],
181 | "metadata": {
182 | "kernelspec": {
183 | "display_name": "py310",
184 | "language": "python",
185 | "name": "python3"
186 | },
187 | "language_info": {
188 | "codemirror_mode": {
189 | "name": "ipython",
190 | "version": 3
191 | },
192 | "file_extension": ".py",
193 | "mimetype": "text/x-python",
194 | "name": "python",
195 | "nbconvert_exporter": "python",
196 | "pygments_lexer": "ipython3",
197 | "version": "3.10.12"
198 | },
199 | "orig_nbformat": 4
200 | },
201 | "nbformat": 4,
202 | "nbformat_minor": 2
203 | }
204 |
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/banner.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/composite-data-types-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/composite-data-types-banner.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/composite-data-types.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/composite-data-types.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/dict.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/dict.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/frozenset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/frozenset.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/list-indexing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/list-indexing.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/list.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/object-audio-player-operations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/object-audio-player-operations.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/object-audio-player.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/object-audio-player.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/object-identity/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/object-identity/1.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/object-identity/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/object-identity/2.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/object-identity/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/object-identity/3.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/object-identity/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/object-identity/4.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/set-operations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/set-operations.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/set.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/set.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/string-indexing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/string-indexing.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/string-neg-indexing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/string-neg-indexing.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/string.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/string.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/tom-jerry-2.avif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/tom-jerry-2.avif
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/tom-jerry-nibbles-tweety-spike-gpt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/tom-jerry-nibbles-tweety-spike-gpt.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/tom-jerry-spike.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/tom-jerry-spike.jpeg
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/tom-jerry-tweety.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/tom-jerry-tweety.jpeg
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/tuple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/tuple.png
--------------------------------------------------------------------------------
/Lectures/04 Data Types/images/variables.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/04 Data Types/images/variables.webp
--------------------------------------------------------------------------------
/Lectures/05 Code Structure and Syntax/01 Introduction.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "# Python Code Structure and Syntax"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "Python is known for its clean and readable syntax, which often makes it an excellent language for beginners in programming. The structure and syntax of Python are designed to be intuitive and maintainable. In this introductory lecture, we will explore the high-level aspects of Python's code structure and syntax, setting the stage for a deeper dive into specific areas such as line continuation, comments, and whitespaces and indentation."
22 | ]
23 | },
24 | {
25 | "cell_type": "markdown",
26 | "metadata": {},
27 | "source": [
28 | "**Table of contents** \n",
29 | "- [Python Syntax Overview](#toc1_) \n",
30 | " - [Simple Statements](#toc1_1_) \n",
31 | " - [Compound Statements](#toc1_2_) \n",
32 | "- [Code Blocks and Indentation](#toc2_) \n",
33 | "- [Executing Python Scripts](#toc3_) \n",
34 | "- [The Importance of Readability](#toc4_) \n",
35 | "\n",
36 | "\n",
43 | ""
44 | ]
45 | },
46 | {
47 | "cell_type": "markdown",
48 | "metadata": {},
49 | "source": [
50 | "## [Python Syntax Overview](#toc0_)"
51 | ]
52 | },
53 | {
54 | "cell_type": "markdown",
55 | "metadata": {},
56 | "source": [
57 | "
"
58 | ]
59 | },
60 | {
61 | "cell_type": "markdown",
62 | "metadata": {},
63 | "source": [
64 | "Python syntax refers to the set of rules that defines how a Python program is written and interpreted. Unlike many other programming languages, Python uses indentation to delimit blocks of code. This enforces readable code by design. Furthermore, Python is less cluttered visually, as it does not use semicolons or parentheses to denote the end of a line or block of code, unless specifically required for multiple statements on a single line or in the case of a complex expression.\n"
65 | ]
66 | },
67 | {
68 | "cell_type": "markdown",
69 | "metadata": {},
70 | "source": [
71 | "### [Simple Statements](#toc0_)\n"
72 | ]
73 | },
74 | {
75 | "cell_type": "markdown",
76 | "metadata": {},
77 | "source": [
78 | "In Python, a statement is typically written on a single line. Simple statements include assignments, function calls, and expression evaluations. Here is an example of a simple statement:\n"
79 | ]
80 | },
81 | {
82 | "cell_type": "markdown",
83 | "metadata": {},
84 | "source": [
85 | "```python\n",
86 | "x = 10\n",
87 | "print(x)\n",
88 | "```\n"
89 | ]
90 | },
91 | {
92 | "cell_type": "markdown",
93 | "metadata": {},
94 | "source": [
95 | "### [Compound Statements](#toc0_)\n"
96 | ]
97 | },
98 | {
99 | "cell_type": "markdown",
100 | "metadata": {},
101 | "source": [
102 | "Compound statements contain groups of other statements and allow for more complex operations. Examples of compound statements include `if`, `for`, `while`, and `def` for function definitions. These statements have a header line and a suite of statements that follow, which are indented relative to the header:\n"
103 | ]
104 | },
105 | {
106 | "cell_type": "markdown",
107 | "metadata": {},
108 | "source": [
109 | "```python\n",
110 | "if x > 5:\n",
111 | " print(\"x is greater than 5\")\n",
112 | "```\n"
113 | ]
114 | },
115 | {
116 | "cell_type": "markdown",
117 | "metadata": {},
118 | "source": [
119 | "## [Code Blocks and Indentation](#toc0_)\n"
120 | ]
121 | },
122 | {
123 | "cell_type": "markdown",
124 | "metadata": {},
125 | "source": [
126 | "
"
127 | ]
128 | },
129 | {
130 | "cell_type": "markdown",
131 | "metadata": {},
132 | "source": [
133 | "A unique feature of Python is that code blocks are defined by their indentation. This means that all lines of code within a block must be indented by the same amount. The block begins where the indentation increases and ends where it decreases. This is different from other languages that use curly braces or keywords to define blocks.\n"
134 | ]
135 | },
136 | {
137 | "cell_type": "markdown",
138 | "metadata": {},
139 | "source": [
140 | "## [Executing Python Scripts](#toc0_)\n"
141 | ]
142 | },
143 | {
144 | "cell_type": "markdown",
145 | "metadata": {},
146 | "source": [
147 | "Python code is typically executed in one of two ways: by running a Python file (script) or by typing directly into the interactive Python interpreter. Jupyter notebooks, such as this one, allow for an interactive experience by combining executable Python cells with documentation.\n"
148 | ]
149 | },
150 | {
151 | "cell_type": "markdown",
152 | "metadata": {},
153 | "source": [
154 | "## [The Importance of Readability](#toc0_)\n"
155 | ]
156 | },
157 | {
158 | "cell_type": "markdown",
159 | "metadata": {},
160 | "source": [
161 | "Python's emphasis on readability is not just about aesthetics; it's a core philosophy of the language. Code is read much more often than it is written, so making it accessible to others (or to yourself in the future) is crucial. The structure and syntax of Python are designed to facilitate this readability.\n"
162 | ]
163 | },
164 | {
165 | "cell_type": "markdown",
166 | "metadata": {},
167 | "source": [
168 | "In the upcoming lectures, we will dive into specific aspects of Python's code structure and syntax. We'll explore line continuation for writing longer blocks of code, the use of comments for documentation and annotation, and the importance of whitespaces and indentation for defining the structure of your code effectively. Each of these elements plays a crucial role in writing clean, understandable Python code."
169 | ]
170 | }
171 | ],
172 | "metadata": {
173 | "kernelspec": {
174 | "display_name": "py310",
175 | "language": "python",
176 | "name": "python3"
177 | },
178 | "language_info": {
179 | "codemirror_mode": {
180 | "name": "ipython",
181 | "version": 3
182 | },
183 | "file_extension": ".py",
184 | "mimetype": "text/x-python",
185 | "name": "python",
186 | "nbconvert_exporter": "python",
187 | "pygments_lexer": "ipython3",
188 | "version": "3.10.12"
189 | }
190 | },
191 | "nbformat": 4,
192 | "nbformat_minor": 2
193 | }
194 |
--------------------------------------------------------------------------------
/Lectures/05 Code Structure and Syntax/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/05 Code Structure and Syntax/images/banner.png
--------------------------------------------------------------------------------
/Lectures/05 Code Structure and Syntax/images/python-coding-syntax.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/05 Code Structure and Syntax/images/python-coding-syntax.jpeg
--------------------------------------------------------------------------------
/Lectures/05 Code Structure and Syntax/images/python-indentation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/05 Code Structure and Syntax/images/python-indentation.png
--------------------------------------------------------------------------------
/Lectures/06 Control Structures/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/06 Control Structures/images/banner.png
--------------------------------------------------------------------------------
/Lectures/06 Control Structures/images/if-condition.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/06 Control Structures/images/if-condition.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/banner.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/dry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/dry.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/function-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/function-output.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/function-parts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/function-parts.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/math-function-input-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/math-function-input-output.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/math-function.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/math-function.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/not-function-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/not-function-output.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/parameters-arguments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/parameters-arguments.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/puppet-func.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/puppet-func.png
--------------------------------------------------------------------------------
/Lectures/07 Functions/images/vending-function.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/07 Functions/images/vending-function.png
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/Notes_Report.txt:
--------------------------------------------------------------------------------
1 | Number of notes: 3
2 | Summary of Notes:
3 | Meeting at 10am...
4 | Buy groceries a...
5 | Call Alice abou...
6 |
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/buffered.txt:
--------------------------------------------------------------------------------
1 | This data is buffered.
2 | This data might be buffered.
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/example.txt:
--------------------------------------------------------------------------------
1 | Welcome to the world of programming!
2 |
3 | Let's dive into the world of Python file handling and unleash the power of programming!
4 |
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/08 File Handling/files/image.png
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/important.txt:
--------------------------------------------------------------------------------
1 | This is important data.
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/monthly_sales_report.txt:
--------------------------------------------------------------------------------
1 | Sales Report for March 2023
2 | ===========================
3 | Total Sales: 9500
4 | Top Product: Gadget Pro
5 | Customer Satisfaction: 89%
6 |
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/mynotes.txt:
--------------------------------------------------------------------------------
1 | Meeting at 10am with the design team.
2 | Buy groceries after work.
3 | Call Alice about the trip.
4 |
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/notes_log.txt:
--------------------------------------------------------------------------------
1 | 2024-02-04 21:45:38 - Note created: 'Meeting at 10am...'
2 | 2024-02-04 21:45:38 - Note appended: 'Buy groceries a...'
3 | 2024-02-04 21:45:38 - Notes saved: ['Meeting at 10am with the design team.', 'Buy groceries after work.', 'Call Alice about the trip.']
4 | 2024-02-04 21:45:38 - Report generated: 'files/Notes_Report.txt'
5 | 2024-02-04 21:45:46 - Note created: 'Meeting at 10am...'
6 | 2024-02-04 21:45:46 - Note appended: 'Buy groceries a...'
7 | 2024-02-04 21:45:46 - Notes saved: ['Meeting at 10am with the design team.', 'Buy groceries after work.', 'Call Alice about the trip.']
8 | 2024-02-04 21:45:46 - Report generated: 'files/Notes_Report.txt'
9 |
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/08 File Handling/files/output.jpg
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/output.txt:
--------------------------------------------------------------------------------
1 | This is the first line.
2 | This is the second line.
3 | This is a new line added in append mode.
4 |
--------------------------------------------------------------------------------
/Lectures/08 File Handling/files/write-example.txt:
--------------------------------------------------------------------------------
1 | New content in the file.
2 | Appended content.
--------------------------------------------------------------------------------
/Lectures/08 File Handling/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/08 File Handling/images/banner.png
--------------------------------------------------------------------------------
/Lectures/08 File Handling/images/encode-decode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/08 File Handling/images/encode-decode.png
--------------------------------------------------------------------------------
/Lectures/08 File Handling/images/file-path-windows-linux.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/08 File Handling/images/file-path-windows-linux.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/access-modification-python.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/access-modification-python.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/aggregation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/aggregation.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/association.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/association.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/banner.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/class-objects.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/class-objects.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/composition.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/composition.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/cookie-cutter.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/cookie-cutter.webp
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/declarative-paradigm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/declarative-paradigm.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/doctor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/doctor.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/hierarchical-inheritance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/hierarchical-inheritance.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/how-what.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/how-what.webp
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/hybrid-inheritance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/hybrid-inheritance.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/imperative-declarative.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/imperative-declarative.gif
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/imperative-paradigm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/imperative-paradigm.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/inheritance-types.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/inheritance-types.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/inheritance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/inheritance.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/multi-level-inheritance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/multi-level-inheritance.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/multiple-inheritance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/multiple-inheritance.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/object-relationships.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/object-relationships.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/object.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/object.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/oop-abstraction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/oop-abstraction.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/oop-encapsulation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/oop-encapsulation.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/oop-inheritance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/oop-inheritance.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/oop-polymorphism.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/oop-polymorphism.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/programming-paradigms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/programming-paradigms.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/single-inheritance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/single-inheritance.png
--------------------------------------------------------------------------------
/Lectures/09 Object Oriented Programming/images/sql-query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/09 Object Oriented Programming/images/sql-query.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/09 Exception Handling.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/09 Exception Handling.ipynb
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/add-config.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/add-config.gif
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/banner.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/bpts-in-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/bpts-in-overview.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/breakpoints.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/breakpoints.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/core-module.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/core-module.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/debug-environments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/debug-environments.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/debug-start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/debug-start.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/debugging_hero.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/debugging_hero.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/launch-configuration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/launch-configuration.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/launch-json-suggestions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/launch-json-suggestions.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/log-points.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/log-points.gif
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/modular-notebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/modular-notebook.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/modules-type.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/modules-type.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/run.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/toolbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/toolbar.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/variables.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/variables.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/vscode-debugger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/vscode-debugger.png
--------------------------------------------------------------------------------
/Lectures/10 Modular Programming/images/watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/10 Modular Programming/images/watch.png
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/01 Project Proposal.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/01 Project Proposal.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/02 Requirements Gathering.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/02 Requirements Gathering.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/03 Design and Planning.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/03 Design and Planning.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/04 Setting Up the Development Environment.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/04 Setting Up the Development Environment.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/05 Modular Design and Code Organization.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/05 Modular Design and Code Organization.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/06 Coding and Implementation.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/06 Coding and Implementation.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/07 Testing and Debugging.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/07 Testing and Debugging.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/08 Dcoumentation and User Guide.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/08 Dcoumentation and User Guide.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/09 Conclusion.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/09 Conclusion.ipynb
--------------------------------------------------------------------------------
/Lectures/11 Capstone Project/10 Course Wrap-up.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/11 Capstone Project/10 Course Wrap-up.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/-- Advanced Composite Data Types.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/-- Advanced Composite Data Types.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/-- Bitwise Operators.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/-- Bitwise Operators.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/01 List Memory Management.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/01 List Memory Management.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/02 Dictionary and Set Hash Table.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/02 Dictionary and Set Hash Table.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/02 Grouping Statements.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "# Grouping Statements: Indentation and Blocks"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "In Python, the way we group statements into larger chunks of code, known as blocks, is fundamental to creating structured and readable programs. Blocks allow us to do more than one thing when a particular condition is true, or when we want to repeat a set of actions multiple times.\n"
22 | ]
23 | },
24 | {
25 | "cell_type": "markdown",
26 | "metadata": {},
27 | "source": [
28 | "For example, consider this everyday scenario represented in pseudocode:\n",
29 | "\n",
30 | "```\n",
31 | "If the weather is nice, then I will:\n",
32 | " Mow the lawn\n",
33 | " Weed the garden\n",
34 | " Take the dog for a walk\n",
35 | "```\n"
36 | ]
37 | },
38 | {
39 | "cell_type": "markdown",
40 | "metadata": {},
41 | "source": [
42 | "Here, if the weather isn't nice, none of these actions will be taken."
43 | ]
44 | },
45 | {
46 | "cell_type": "markdown",
47 | "metadata": {},
48 | "source": [
49 | "In Python, a block of code is defined by its indentation level. This is known as the \"off-side rule,\" a term derived from the sport of football, which describes how Python uses indentation to denote block structures.\n"
50 | ]
51 | },
52 | {
53 | "cell_type": "markdown",
54 | "metadata": {},
55 | "source": [
56 | "In this lecture, we take a closer look at Python's approach to blocks and indentation, and how we can use them to create more complex programs."
57 | ]
58 | },
59 | {
60 | "cell_type": "markdown",
61 | "metadata": {},
62 | "source": [
63 | "**Table of contents** \n",
64 | "- [The Importance of Indentation](#toc1_) \n",
65 | "- [No Explicit Block Delimiters](#toc2_) \n",
66 | "- [Nested Blocks](#toc3_) \n",
67 | "- [The Debate Over Indentation](#toc4_) \n",
68 | "- [Summary](#toc5_) \n",
69 | "\n",
70 | "\n",
77 | ""
78 | ]
79 | },
80 | {
81 | "cell_type": "markdown",
82 | "metadata": {},
83 | "source": [
84 | "## [The Importance of Indentation](#toc0_)\n"
85 | ]
86 | },
87 | {
88 | "cell_type": "markdown",
89 | "metadata": {},
90 | "source": [
91 | "Python uses indentation to define blocks, where contiguous statements indented to the same level form a compound statement or suite. This indentation provides a clear visual structure to your code, making it more readable and maintainable."
92 | ]
93 | },
94 | {
95 | "cell_type": "markdown",
96 | "metadata": {},
97 | "source": [
98 | "
"
99 | ]
100 | },
101 | {
102 | "cell_type": "markdown",
103 | "metadata": {},
104 | "source": [
105 | "In this structure, all the statements with the same indentation level (lines 2 to 5) are considered part of the same block, executed if `` is true. After the block is executed or skipped, the program continues with ``.\n"
106 | ]
107 | },
108 | {
109 | "cell_type": "markdown",
110 | "metadata": {},
111 | "source": [
112 | "In C, the `if` statement is used with curly braces `{}` to define the scope of the conditional block. The braces are required to group multiple statements within the block.\n",
113 | "\n",
114 | "```c\n",
115 | "// C if statement example\n",
116 | "#include \n",
117 | "\n",
118 | "int main() {\n",
119 | " int x = 10;\n",
120 | " if (x > 5) {\n",
121 | " printf(\"x is greater than 5\\n\");\n",
122 | " printf(\"This will print if the condition is true\\n\");\n",
123 | " }\n",
124 | " // This will print regardless of the condition\n",
125 | " printf(\"This is outside the if block\\n\");\n",
126 | " return 0;\n",
127 | "}\n",
128 | "```"
129 | ]
130 | },
131 | {
132 | "cell_type": "markdown",
133 | "metadata": {},
134 | "source": [
135 | "In this C code, the printf statements within the curly braces `{}` will only execute if `x` is greater than 5. The last printf statement is outside the `if` block and will execute regardless of the condition."
136 | ]
137 | },
138 | {
139 | "cell_type": "markdown",
140 | "metadata": {},
141 | "source": [
142 | "## [No Explicit Block Delimiters](#toc0_)\n"
143 | ]
144 | },
145 | {
146 | "cell_type": "markdown",
147 | "metadata": {},
148 | "source": [
149 | "Unlike many other programming languages that use specific characters (like `{}` in C, C++, and Java) to define blocks, Python's block delimiters are implicit with indentation levels. The end of a block is simply indicated by a dedent to a lower level of indentation.\n"
150 | ]
151 | },
152 | {
153 | "cell_type": "markdown",
154 | "metadata": {},
155 | "source": [
156 | "## [Nested Blocks](#toc0_)\n"
157 | ]
158 | },
159 | {
160 | "cell_type": "markdown",
161 | "metadata": {},
162 | "source": [
163 | "Blocks can be nested within other blocks in Python, allowing for complex decision-making and code organization.\n"
164 | ]
165 | },
166 | {
167 | "cell_type": "code",
168 | "execution_count": 1,
169 | "metadata": {},
170 | "outputs": [
171 | {
172 | "name": "stdout",
173 | "output_type": "stream",
174 | "text": [
175 | "Outer condition is true\n",
176 | "Between inner conditions\n",
177 | "Inner condition 2\n",
178 | "End of outer condition\n",
179 | "After outer condition\n"
180 | ]
181 | }
182 | ],
183 | "source": [
184 | "# Does line execute? Yes No\n",
185 | "# --- --\n",
186 | "if 'foo' in ['foo', 'bar', 'baz']: # x\n",
187 | " print('Outer condition is true') # x\n",
188 | "\n",
189 | " if 10 > 20: # x\n",
190 | " print('Inner condition 1') # x\n",
191 | "\n",
192 | " print('Between inner conditions') # x\n",
193 | "\n",
194 | " if 10 < 20: # x\n",
195 | " print('Inner condition 2') # x\n",
196 | "\n",
197 | " print('End of outer condition') # x\n",
198 | "print('After outer condition') # x"
199 | ]
200 | },
201 | {
202 | "cell_type": "markdown",
203 | "metadata": {},
204 | "source": [
205 | "## [The Debate Over Indentation](#toc0_)\n"
206 | ]
207 | },
208 | {
209 | "cell_type": "markdown",
210 | "metadata": {},
211 | "source": [
212 | "Programmers have strong opinions about indentation. Those in favor of Python's approach argue that it enforces readability and consistency. Critics may dislike being forced into a particular style, or they may encounter issues with mixed spaces and tabs. However, many who were initially skeptical of Python's indentation have grown to prefer it.\n"
213 | ]
214 | },
215 | {
216 | "cell_type": "markdown",
217 | "metadata": {},
218 | "source": [
219 | "## [Summary](#toc0_)\n"
220 | ]
221 | },
222 | {
223 | "cell_type": "markdown",
224 | "metadata": {},
225 | "source": [
226 | "In Python, indentation is not just a matter of style but a core aspect of the language syntax. It defines how we group statements into blocks, which in turn dictate the flow and structure of our code. As we proceed with learning Python, you'll see how indentation plays a critical role in various control structures.\n"
227 | ]
228 | },
229 | {
230 | "cell_type": "markdown",
231 | "metadata": {},
232 | "source": [
233 | "Let's embrace Python's clean and intuitive way of structuring code and enjoy the benefits it brings to readability and maintainability."
234 | ]
235 | }
236 | ],
237 | "metadata": {
238 | "kernelspec": {
239 | "display_name": "py310",
240 | "language": "python",
241 | "name": "python3"
242 | },
243 | "language_info": {
244 | "codemirror_mode": {
245 | "name": "ipython",
246 | "version": 3
247 | },
248 | "file_extension": ".py",
249 | "mimetype": "text/x-python",
250 | "name": "python",
251 | "nbconvert_exporter": "python",
252 | "pygments_lexer": "ipython3",
253 | "version": "3.10.12"
254 | }
255 | },
256 | "nbformat": 4,
257 | "nbformat_minor": 2
258 | }
259 |
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/03 Variable-length Arguments (*args and **kwargs).ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/03 Variable-length Arguments (*args and **kwargs).ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/04 Namespaces in Python.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/04 Namespaces in Python.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/05 Variable Scope.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/05 Variable Scope.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/06 Namespace Dictionaries.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/06 Namespace Dictionaries.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/07 Error and Exception Handling.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Error and Exception Handling"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "When writing software, encountering errors is a natural part of the process. No matter how experienced a programmer is, it is impossible to create an error-free program on the first attempt. Errors in programming can generally be categorized into two types: syntax errors and exceptions.\n"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "A **syntax error** occurs when the parser detects an incorrect statement. This kind of error is usually straightforward to fix because the Python interpreter will point out the line of code where the error occurred and often indicate the type of syntax issue. For example, forgetting a colon at the end of an `if` statement will raise a syntax error:\n"
22 | ]
23 | },
24 | {
25 | "cell_type": "code",
26 | "execution_count": 1,
27 | "metadata": {},
28 | "outputs": [
29 | {
30 | "ename": "SyntaxError",
31 | "evalue": "expected ':' (191840768.py, line 1)",
32 | "output_type": "error",
33 | "traceback": [
34 | "\u001b[0;36m Cell \u001b[0;32mIn[1], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m if 5 > 3\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m expected ':'\n"
35 | ]
36 | }
37 | ],
38 | "source": [
39 | "if 5 > 3\n",
40 | " print(\"Five is greater than three.\")"
41 | ]
42 | },
43 | {
44 | "cell_type": "markdown",
45 | "metadata": {},
46 | "source": [
47 | "On the other hand, **exceptions** are errors detected during execution that are not unconditionally fatal. Unlike syntax errors, exceptions can be handled at runtime, allowing the programmer to provide alternative solutions or graceful exits. For instance, trying to devide by zero will raise a `ZeroDivisionError` exception:\n"
48 | ]
49 | },
50 | {
51 | "cell_type": "code",
52 | "execution_count": 3,
53 | "metadata": {},
54 | "outputs": [
55 | {
56 | "ename": "ZeroDivisionError",
57 | "evalue": "division by zero",
58 | "output_type": "error",
59 | "traceback": [
60 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
61 | "\u001b[0;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
62 | "Cell \u001b[0;32mIn[3], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;241;43m3\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m/\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\n",
63 | "\u001b[0;31mZeroDivisionError\u001b[0m: division by zero"
64 | ]
65 | }
66 | ],
67 | "source": [
68 | "3 / 0"
69 | ]
70 | },
71 | {
72 | "cell_type": "markdown",
73 | "metadata": {},
74 | "source": [
75 | "To handle exceptions, Python provides a `try` statement, which allows the programmer to test a block of code for errors. The `try` block is followed by one or more `except` blocks, which will catch the exceptions raised in the `try` block. The general syntax of a `try` statement is as follows:"
76 | ]
77 | },
78 | {
79 | "cell_type": "code",
80 | "execution_count": 4,
81 | "metadata": {},
82 | "outputs": [
83 | {
84 | "name": "stdout",
85 | "output_type": "stream",
86 | "text": [
87 | "You can't divide by zero!\n"
88 | ]
89 | }
90 | ],
91 | "source": [
92 | "try:\n",
93 | " # code that may raise an exception\n",
94 | " 7 / 0\n",
95 | "except ZeroDivisionError:\n",
96 | " # code to handle the exception\n",
97 | " print(\"You can't divide by zero!\")"
98 | ]
99 | },
100 | {
101 | "cell_type": "markdown",
102 | "metadata": {},
103 | "source": [
104 | "Properly handling exceptions is crucial for building robust applications that can deal with unexpected situations without crashing. It improves the user experience by providing informative messages and resolving issues without interrupting the program's flow.\n"
105 | ]
106 | },
107 | {
108 | "cell_type": "markdown",
109 | "metadata": {},
110 | "source": [
111 | "By the end of this lecture, you will have a solid understanding of the different types of exceptions, how to handle them, and how to use them as a tool for debugging and improving your code. You'll learn to anticipate potential problems and write code that is both resilient and user-friendly."
112 | ]
113 | }
114 | ],
115 | "metadata": {
116 | "kernelspec": {
117 | "display_name": "py310",
118 | "language": "python",
119 | "name": "python3"
120 | },
121 | "language_info": {
122 | "codemirror_mode": {
123 | "name": "ipython",
124 | "version": 3
125 | },
126 | "file_extension": ".py",
127 | "mimetype": "text/x-python",
128 | "name": "python",
129 | "nbconvert_exporter": "python",
130 | "pygments_lexer": "ipython3",
131 | "version": "3.10.12"
132 | }
133 | },
134 | "nbformat": 4,
135 | "nbformat_minor": 2
136 | }
137 |
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/07 Modify Variables Out of Scope.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/07 Modify Variables Out of Scope.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/08 Recursion.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/08 Recursion.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/09 The with Statement and Context Managers.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/09 The with Statement and Context Managers.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/10 Dependency Management.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/10 Dependency Management.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/13 Error Handling with try and Except.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "# Error Handling and Exceptions"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "In the real world, anything can go wrong, and the same is true when it comes to programming. From unexpected user input to resource constraints, errors are inevitable in any application. Python provides a powerful mechanism for handling these unexpected situations through error handling and exceptions, allowing developers to anticipate and gracefully manage potential issues in their code.\n"
22 | ]
23 | },
24 | {
25 | "cell_type": "markdown",
26 | "metadata": {},
27 | "source": [
28 | "**What Are Exceptions?**\n",
29 | "\n",
30 | "In Python, an exception is an event that disrupts the normal flow of a program. It's Python's way of signaling that an error has occurred. When an exception is raised, if not properly handled, the program will terminate with an error message. This is often undesirable, especially for applications that require high availability or that interact with users. Instead, Python provides a way to catch these exceptions and respond to them without exiting the program.\n"
31 | ]
32 | },
33 | {
34 | "cell_type": "markdown",
35 | "metadata": {},
36 | "source": [
37 | "**Why Handle Exceptions?**\n",
38 | "\n",
39 | "Exception handling is a critical component of robust, maintainable, and user-friendly Python code. By handling exceptions, developers can:\n",
40 | "\n",
41 | "- Prevent the program from crashing unexpectedly.\n",
42 | "- Provide more informative error messages to users.\n",
43 | "- Recover from an error state or execute cleanup actions.\n",
44 | "- Decide how to proceed based on the type of exception raised.\n"
45 | ]
46 | },
47 | {
48 | "cell_type": "markdown",
49 | "metadata": {},
50 | "source": [
51 | "**How Do We Handle Exceptions?**\n",
52 | "\n",
53 | "Python uses a `try` and `except` block to handle exceptions. The `try` block contains the code that may cause an exception, while the `except` block contains the code that runs if an exception occurs. We can also use the `else` and `finally` blocks to define actions that should be taken depending on whether exceptions were raised or not.\n"
54 | ]
55 | },
56 | {
57 | "cell_type": "markdown",
58 | "metadata": {},
59 | "source": [
60 | "In this section of the Jupyter notebook, we will dive into the intricacies of error handling and exceptions in Python:\n",
61 | "\n",
62 | "- **Try and Except Blocks**: Learn the basics of catching exceptions in Python using `try` and `except` blocks.\n",
63 | "- **Handling Multiple Exceptions**: Understand how to handle different exception types in a single `except` statement or using multiple `except` statements.\n",
64 | "- **Else Clause in Error Handling**: Discover how to use the `else` clause to specify a block of code to be executed if no exceptions were raised.\n",
65 | "- **Finally Block**: Explore the `finally` block, which is executed no matter what, and is used for cleaning up resources or applying necessary final touches.\n",
66 | "- **Raising Exceptions with Raise**: Learn how to intentionally raise exceptions in your code with the `raise` keyword, allowing you to enforce certain conditions or handle issues proactively.\n"
67 | ]
68 | },
69 | {
70 | "cell_type": "markdown",
71 | "metadata": {},
72 | "source": [
73 | "Throughout this section, we'll be using practical examples to illustrate how each of these components can be used to make your Python programs more resilient and user-friendly.\n"
74 | ]
75 | },
76 | {
77 | "cell_type": "markdown",
78 | "metadata": {},
79 | "source": [
80 | "Let's get started with learning how to handle exceptions effectively in Python!"
81 | ]
82 | }
83 | ],
84 | "metadata": {
85 | "language_info": {
86 | "name": "python"
87 | }
88 | },
89 | "nbformat": 4,
90 | "nbformat_minor": 2
91 | }
92 |
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/23 Converting Between Composite Data Types.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "
"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "### Data Type Conversion in Python"
15 | ]
16 | },
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {},
20 | "source": [
21 | "\n",
22 | "Welcome to the lecture on Data Type Conversion in Python. In programming, data types are crucial as they tell us what kind of value is stored in a variable and what operations can be performed on it. Python is dynamically typed, which means you don't have to explicitly declare the data type of a variable. This provides a lot of flexibility, but it also means that sometimes you'll need to convert data from one type to another to perform certain operations or meet the requirements of a function or method.\n"
23 | ]
24 | },
25 | {
26 | "cell_type": "markdown",
27 | "metadata": {},
28 | "source": [
29 | "\n",
30 | "Understanding how to convert between data types is essential for a variety of reasons:\n",
31 | "\n",
32 | "- **Data compatibility:** Some operations require inputs to be of a certain data type. For example, you cannot concatenate a string and an integer directly. You need to convert the integer to a string first.\n",
33 | " \n",
34 | "- **Data processing:** When processing data, you might need to convert it to a more suitable format. For instance, you may receive data as a string that actually represents a list of items, and you'll want to convert it to a list to iterate over it.\n",
35 | "\n",
36 | "- **API integration:** When working with APIs or external data sources, you may receive data in a format that is not immediately usable in your code. Converting this data into a native Python data type can make it easier to work with.\n",
37 | "\n",
38 | "- **Storage and retrieval:** When saving data to a file or database, or retrieving it, conversions may be necessary to ensure the data is in the correct format for the storage system or for further processing after retrieval.\n"
39 | ]
40 | },
41 | {
42 | "cell_type": "markdown",
43 | "metadata": {},
44 | "source": [
45 | "\n",
46 | "In real-world scenarios, data type conversion is a common task. For example, when you're reading user input from the command line, everything comes in as a string, and you might need to convert those strings into numbers to perform calculations. Or when you're working with JSON data, you might need to convert lists and dictionaries to strings to send them over a network.\n"
47 | ]
48 | },
49 | {
50 | "cell_type": "markdown",
51 | "metadata": {},
52 | "source": [
53 | "\n",
54 | "In this lecture, we will cover both implicit and explicit type conversions. Implicit type conversion, also known as coercion, is performed by Python automatically. Explicit type conversion, on the other hand, is done manually by the programmer using built-in functions.\n"
55 | ]
56 | },
57 | {
58 | "cell_type": "markdown",
59 | "metadata": {},
60 | "source": [
61 | "\n",
62 | "By the end of this lecture, you will be familiar with the tools and techniques to convert between strings, lists, tuples, sets, dictionaries, and frozensets. You will also understand when and how to apply these conversions effectively in your own programs.\n",
63 | "\n",
64 | "Let's get started by exploring implicit and explicit type conversion in more detail."
65 | ]
66 | }
67 | ],
68 | "metadata": {
69 | "language_info": {
70 | "name": "python"
71 | }
72 | },
73 | "nbformat": 4,
74 | "nbformat_minor": 2
75 | }
76 |
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/25 Basic OOP Concepts.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/25 Basic OOP Concepts.ipynb
--------------------------------------------------------------------------------
/Lectures/12 Advanced Topics/26 Custom Data Types using Classes.ipynb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/12 Advanced Topics/26 Custom Data Types using Classes.ipynb
--------------------------------------------------------------------------------
/Lectures/images/exercise-banner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/Lectures/images/exercise-banner.gif
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | 
4 | 
5 | 
6 | 
7 | 
8 | [](https://www.pytopia.ai)
9 | [](https://t.me/pytopia_ai)
10 | [](https://instagram.com/pytopia.ai)
11 | [](https://www.youtube.com/c/pytopia)
12 | [](https://linkedin.com/company/pytopia)
13 | [](https://twitter.com/pytopia_ai)
14 |
15 | Welcome to our comprehensive Python Course Repository. This course was created with learners in mind, from beginners wanting to dip their toes into the expansive ocean of coding, to seasoned veterans wanting to brush up or expand on their Python knowledge. This course covers a wide range of Python programming concepts, with a keen interaction of theory and practice at every stage.
16 |
17 | Our course is neatly divided into several modules:
18 | - **Introduction**: Basic overview of Python and its relevance in today's world.
19 | - **Python Setup**: Guiding learners through the process of installing and setting up Python in their environment.
20 | - **Getting Started**: Beginners' guide to understanding and writing Python code.
21 | - **Data Types**: Overview of the different data types in Python and how to use them.
22 | - **Code Structure and Syntax**: In-depth look into Python's syntax and rules for writing valid code.
23 | - **Control Structures**: Exploring how to manipulate the flow of a Python program using control structures.
24 | - **Functions**: Introduction to functions for writing reusable code.
25 | - **File Handling**: Learning to read, write, and manipulate files using Python.
26 | - **Object-Oriented Programming**: Understanding the fundamental principles of object-oriented programming and its implementation in Python.
27 | - **Modular Programming**: Teaching the concept of writing modular code that's organized and easy to understand.
28 | - **Advanced Topics:** Detailed study of advanced topics such as exception handling, regular expressions, multithreading, etc.
29 | - **Capstone Project**: A practical project that lets learners apply what they've learned over the course.
30 |
31 |
32 | # 📚 Learn with Us!
33 | We also offer a [course on these projects](https://www.pytopia.ai/courses/python) where learners can interact with peers and instructors, ask questions, and participate in online coding sessions. By registering for the course, you also gain access to our dedicated Telegram group. Enroll now and start learning! Here are some useful links:
34 |
35 | - [Python Programming Course](https://www.pytopia.ai/courses/python)
36 | - [Pytopia Public Telegram Group](https://t.me/pytopia_ai)
37 | - [Pytopia Website](https://www.pytopia.ai/)
38 |
39 | [
](https://www.pytopia.ai/courses/python)
40 |
41 | # 🚦 Getting Started
42 | To start using the projects in this repository:
43 |
44 | - Clone the repo to your local machine: `git clone https://github.com/pytopia/python-programming.git`
45 | - Navigate to the specific project directory and Start working on the project using the provided template code and following the project description.
46 |
47 | # 🤝 Contributing
48 | We welcome contributions from the community! If you have a project you'd like to add to this repository, please open a pull request. We'll review your project and merge it into the repository if it meets our standards.
49 |
50 | # 📞 Contact Information
51 |
52 | Feel free to reach out to us!
53 |
54 | - 🌐 Website: [pytopia.ia](https://www.pytopia.ai)
55 | - 💬 Telegram: [pytopia_ai](https://t.me/pytopia_ai)
56 | - 🎥 YouTube: [pytopia](https://www.youtube.com/c/pytopia)
57 | - 📸 Instagram: [pytopia.ai](https://www.instagram.com/pytopia.ai)
58 | - 🎓 LinkedIn: [pytopia](https://www.linkedin.com/in/pytopia)
59 | - 🐦 Twitter: [pytopia_ai](https://twitter.com/pytopia_ai)
60 | - 📧 Email: [pytopia.ai@gmail.com](mailto:pytopia.ai@gmail.com)
61 |
--------------------------------------------------------------------------------
/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/images/banner.png
--------------------------------------------------------------------------------
/images/logo.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/images/logo.webp
--------------------------------------------------------------------------------
/images/pytopia-course.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pytopia/Python-Programming/33de1428e7ea51aafb2fd434559c96f1e03117fe/images/pytopia-course.png
--------------------------------------------------------------------------------
/test.py:
--------------------------------------------------------------------------------
1 | def greet(name):
2 | greeting = f"Hello, {name}!"
3 | return greeting
4 |
5 | def main():
6 | user_name = input("Enter your name: ")
7 | message = greet(user_name)
8 | print(message)
9 |
10 | if __name__ == "__main__":
11 | main()
--------------------------------------------------------------------------------