- created by: Sudip Ghimire
- URL: https://www.sudipghimire.com.np
- GitHub: https://github.com/ghimiresdp
A repository for Python course notes, examples, and lab exercises targeted to my students and interns.
You can clone
or fork
the repository and review the course contents, examples, and attend exercises.
- Chapter 1 - 10: Easy
- Chapter 11 - 20: Medium
-
- Introduction to Python
- Python Environment Setup, IDE Setup
- Hello World in Python
- Running Python Programs
- comments and documentation
- Single Line Comments
- inline Comments
- Multiline Comments
- Docstrings
- indentation
- Chapter 1 Quiz
-
Variables, basic data type and operations
- Variables, constants, and keywords
- Numeric Data Types
- Strings
- String Formatting
- Basic Operations
- Type Hinting in Python (only for python 3.6 and later)
- Type Conversion / Typecasting
- Chapter 2 Quiz
-
Loops, Pattern Generation, and Comprehension
- While Loop
- For Loop
- the
enumerate()
function - the
zip()
function
- the
break
,continue
, andpass
statements- Pattern Generation
- Comprehensions
-
- Introduction to Functions
- Defining a function
- Calling a function
- the
return
statement - the
pass
statement - Local Variables and Global variables
- default arguments
- arguments and keyword arguments
- Recursive Functions
- Lambda functions
- Introduction to Functions
-
- Introduction to Object Oriented Programming
- Class
- Class attributes, methods, and the
self
parameter - the Constructor method
- built-in class attributes
- object
- Encapsulation in python (
_
,__
in identifier)- getters and setters
- Operator Overloading
- Class methods and Static methods
- Inheritance and Polymorphism
- Parent Class
- Child Class
super()
function- Mixins
- Introduction to Object Oriented Programming
-
- Introduction to modular programming
__init__.py
file- An example of modular python program | importing the module
- from keyword
datetime
modulerandom
modulejson
module
open()
functionclose()
methodwrite()
methodread()
methodwith
keyword
-
Exceptions and Exception Handling
- Introduction to Exceptions in Python
- Standard Errors
try
,except
keywordtry
except
else
finally
keywordraise
keyword- User Defined Exceptions
- Total
The repository has its folder structure as shown in example below:
python-notes
├── LICENSE
├── README.md
├── course
│ ├── c01_basics
│ │ ├── Chapter 1 Basics.md
│ │ ├── README.md
│ │ ├── code
│ │ │ ├── c0101_hello_world.py
│ │ │ └── c0102_comments.py
│ │ └── quiz
│ │ ├── README.md
│ │ └── solution
│ │ ├── q0101.py
│ │ └── q0102.py
│ └── ...
│
├── projects
│ ├── project_01
│ │ ├── project_01_requirements.md
│ │ └── rock_paper_scissor
│ │ ├── README.md
│ │ └── game.py
│ └── ...
If you're directly cloning the repository, I suggest you to solve in the different branch than the
main
branch to avoid conflicts if the course content changes.
If you're forking, I suggest you not to make any changes in the
main
branch in your repository too so that you can pull and rebase future changes to yourfork
.
for pulling the future changes you can add remote
in your local repository with the commands below:
Please do visit my website sudipghimire.com.np to know more about my engagements.