python-perks
is a repository for Python course notes, examples, and lab exercises targeted to students, professionals, and enthusiasts.
This repository is intended to provide you a quick guide to starting your journey as a python programmer.
You are advised to fork this repository and solve problems as you proceed to different levels while still being able to sync with the new changes in the repository.
NOTE: If you are an absolute beginner in python, please check Notes section first to get started with python.
- Algorithms
- Searching Algorithms
- Sorting Algorithms
- Data Structures
- Design Patterns
- Adapter Pattern
- Builder Pattern
- Command Pattern
- Decorator Pattern
- Factory Pattern
- Observer Pattern
- Singleton Pattern
- Strategy Pattern
-
- Coin Change Problem
- Fibonacci Series Problem
- Palindrome Partition Problem
- Minimizing the sum of list of integers
- Longest Common Subsequence Problem
-
- 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
-
- 6.1. Introduction to Functions
- Defining a function
- Calling a function
- the
return
statement - the
pass
statement - Local Variables and Global variables
- 6.2. default arguments
- 6.3. Arbitrary Arguments and Keyword Arguments
- 6.4. Recursive Functions
- 6.5. Lambda functions
- Chapter 6 Quiz
- 6.1. Introduction to Functions
-
- 7.1. Introduction to Object-Oriented Programming
- Class
- Class attributes, methods, and the
self
parameter - the Constructor method
- built-in class attributes
- object
- 7.2. Class methods and Static methods
- 7.3. Operator Overloading
- 7.4. Encapsulation in python
- 7.5. Inheritance and Polymorphism
- Parent Class
- Child Class
super()
function- Mixins
- Chapter 7 Quiz
- 7.1. Introduction to Object-Oriented Programming
- 8.1. Python Modules
- 8.2. Packages
- 8.3.
datetime
Module - 8.4.
random
Module - 8.5.
json
Module - 8.6.
math
Module - 8.7.
complex
andcmath
Module
- 9.1. Introduction to File Handling
- 9.2. File Opening Modes
- 9.3. Opening and closing a file in python
- 9.4. Reading a file
- 9.5. Writing into a file
- 9.6. Appending into a file
- 9.7. Reading a file line by line
-
Exceptions and Exception Handling
- 10.1. Introduction to Exceptions
- 10.2. Exception Handling in Python
- Standard Errors
try
,except
keywordtry
except
else
finally
keywordraise
keyword
- 10.3. Custom Exceptions
- Total
The repository has its folder structure as shown in example below:
notes
├── README.md
├── c01_basics
│ ├── Chapter 1 Basics.md
│ ├── README.md
│ ├── code
│ │ ├── c0101_hello_world.py
│ │ └── c0102_comments.py
│ └── quiz
│ ├── README.md
│ └── solution
│ ├── q0101.py
│ └── q0102.py
├── c02_...
├── c03_...
│
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 new remote
as upstream in your
local repository with the commands below:
# step 1: add the upstream remote as git@github.com:ghimiresdp/python-perks.git
# step 2: pull from the upstream
# step 3: push to the origin
git remote add upstream git@github.com:ghimiresdp/python-perks.git
git pull upstream main
git push origin main