Skip to content

rubayetkabirzisan/Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ 100 Days of Python

A structured, day-by-day Python learning journal documenting progress through ~80+ concepts โ€” from bare-bones syntax to multithreading, async I/O, OOP design patterns, web scraping, and CLI tooling.

This repository tracks hands-on practice following the CodeWithHarry 100 Days of Python curriculum, with each day as a self-contained, runnable script.


๐Ÿ“Œ Why This Exists

Learning by doing. Every script in this repo was written from scratch โ€” the goal was to understand why each construct works, not just what it does. Topics escalate deliberately: the same building blocks that appear in Day 10 (loops, conditionals) resurface in Day 39 (quiz game), Day 47 (encoder/decoder), and Day 98 (concurrent downloads) โ€” showing how fundamentals compose into real programs.


๐Ÿ—‚๏ธ Repository Structure

Python-main/
โ”‚
โ”œโ”€โ”€ Day 1/          # Hello World, first variable
โ”œโ”€โ”€ Day 2โ€“9/        # Core syntax: types, operators, typecasting, input
โ”œโ”€โ”€ Day 10โ€“15/      # Strings, slicing, built-in methods, time module
โ”œโ”€โ”€ Day 16โ€“19/      # Control flow: match/case, for/while, break/continue
โ”œโ”€โ”€ Day 20โ€“30/      # Functions: args, kwargs, recursion, scope
โ”œโ”€โ”€ Day 31โ€“35/      # Data structures: lists, tuples, sets
โ”œโ”€โ”€ Day 36โ€“38/      # Exception handling: try/except/finally, raise
โ”œโ”€โ”€ Day 39โ€“44/      # Projects + modules: quiz game, encoder, imports
โ”œโ”€โ”€ Day 47โ€“54/      # File I/O, lambdas, map/filter/reduce
โ”œโ”€โ”€ Day 56โ€“74/      # OOP: classes, inheritance, polymorphism, magic methods
โ”œโ”€โ”€ Day 77โ€“86/      # Advanced OOP, CLI tooling, operator overloading
โ”œโ”€โ”€ Day 87โ€“98/      # Concurrency: threading, asyncio, web scraping
โ”‚
โ”œโ”€โ”€ myfile.txt      # Sample data used in file I/O exercises
โ”œโ”€โ”€ sample.txt      # Sample data used in file seek/truncate exercises
โ””โ”€โ”€ requirements.txt

๐Ÿง  Concepts Covered

๐Ÿ”ฐ Foundations

Day Concept
1โ€“4 Variables, print(), basic data types (int, float, str, bool, complex)
5 Escape sequences, print() separators and end characters
6 Lists, tuples, dictionaries โ€” first look
7โ€“8 Arithmetic and assignment operators
9 Typecasting โ€” explicit (int(), float()) and implicit
10 input(), stdin handling, type conversion from user input

๐Ÿ“ Strings

Day Concept
11 String indexing, iteration, concatenation
12 Slicing with positive and negative indices
13 15+ string methods: upper, lower, split, replace, find, index, count, startswith, endswith, isalpha, isalnum, isspace, swapcase, title, center
28 str.format() and f-strings with format specifiers (e.g. :.2f)

๐Ÿ” Control Flow

Day Concept
14 if, elif, else โ€” including nested conditions
15 time.strftime for time-based branching
16 match/case (Python 3.10+ structural pattern matching)
17 for loops โ€” strings, lists, range() with step
18 while loop with else clause
19 break and continue

โš™๏ธ Functions

Day Concept
20 Defining functions, return values, pass
21 Default args, *args (variadic positional), **kwargs (variadic keyword)
29 Docstrings โ€” __doc__ attribute
30 Recursion โ€” factorial, Fibonacci (conceptual)
48 Variable scope โ€” local vs global, global keyword
52 Lambda functions
53 Higher-order functions: map(), filter(), reduce()
59 Decorators โ€” wrapping functions, preserving args with *args/**kwargs
92 lru_cache โ€” memoization for expensive repeated calls

๐Ÿ—„๏ธ Data Structures

Day Concept
22โ€“23 Lists โ€” comprehensions, sort, reverse, count, copy, insert, extend
24โ€“25 Tuples โ€” immutability, count(), index() with start/end bounds
31โ€“32 Sets โ€” creation, union, intersection, difference, symmetric_difference, issubset, issuperset, isdisjoint
33โ€“34 Dictionaries โ€” keys(), values(), items(), pop(), popitem(), update()

๐Ÿ“‚ File I/O

Day Concept
49 Reading and writing files โ€” open(), modes (r, w, a), with statement
50 Parsing CSV-like text files line by line
51 seek(), tell(), truncate() for byte-level file control

๐Ÿšจ Error Handling

Day Concept
36 try/except โ€” catching ValueError, IndexError
37 finally block โ€” guaranteed execution regardless of outcome
38 raise โ€” manually throwing exceptions with custom messages

๐Ÿ“ฆ Modules & Imports

Day Concept
43โ€“44 import, from x import y, import as, dir(), math module
3, 43 Third-party imports: pandas, hashlib

๐Ÿ—๏ธ Object-Oriented Programming

Day Concept
56โ€“57 Classes, objects, class variables vs instance variables
58 __init__ constructor
60 @property and .setter for encapsulated attribute access
61โ€“62 Inheritance โ€” Programmer(Employee), protected members (_name)
65 @staticmethod โ€” utility methods without self or cls
66 Class variables, noOfEmployees counter pattern
69โ€“70 @classmethod โ€” alternate constructors, class-level state mutation
71 __dict__ introspection, help()
72 super() โ€” calling parent __init__ cleanly
73 Magic/dunder methods: __str__, __repr__, __len__, __call__
74 Method overriding + super() in multi-level inheritance
77 Operator overloading โ€” __add__ for a custom Vector class
78โ€“79 Polymorphism (method overriding), multiple inheritance
80 MRO (Method Resolution Order) โ€” GoldenRetriever.mro()
81 Hybrid and hierarchical inheritance patterns

โšก Advanced Python

Day Concept
41 Ternary operator
42 enumerate() with custom start index
54 None โ€” identity check (is) vs equality (==)
84 time.localtime(), time.strftime(), performance timing
85 argparse โ€” building a real CLI tool with positional + optional args
86 Walrus operator (:=, Python 3.8+) โ€” assignment inside expressions
87 shutil + os โ€” file/directory copy, move, remove, rmtree
91 Generators โ€” yield, lazy evaluation, memory efficiency
95 Regular expressions โ€” re.search, re.finditer, character classes, anchors

๐Ÿ”„ Concurrency & Networking

Day Concept
89 Web scraping โ€” requests + BeautifulSoup, parsing HTML, extracting tags
96 asyncio โ€” async def, await, asyncio.gather() for concurrent HTTP
97 Threading โ€” threading.Thread, ThreadPoolExecutor, executor.map()
98 Multiprocessing โ€” ProcessPoolExecutor, concurrent file downloading

๐Ÿš€ Notable Programs

๐ŸŽฎ KBC Quiz Game โ€” Day 39

A terminal recreation of Kaun Banega Crorepati (Who Wants to Be a Millionaire). Manages a question bank, prize ladder, quit-and-bank logic, and lifeline milestones. Demonstrates list-of-lists data modelling, loop control, f-string formatting, and stateful game logic โ€” entirely in the standard library.

๐Ÿ” Secret Code Encoder/Decoder โ€” Day 47

A two-way string cipher. Short words are reversed; longer words have their first character rotated to the end with fixed random pads appended. Decoding reverses the exact transformation. Shows string slicing, join/split patterns, and conditional branching on string length.

๐Ÿ“ฅ CLI File Downloader โ€” Day 85

A proper command-line tool built with argparse. Accepts a URL as a positional argument and an optional -o/--output filename flag. Streams large files in chunks using requests to avoid loading the full response into memory โ€” a real-world pattern used in production download utilities.

python main.py https://example.com/image.jpg -o output.jpg

๐Ÿ•ธ๏ธ Web Scraper โ€” Day 89

Fetches a live webpage, parses the full HTML tree with BeautifulSoup, and extracts all <h2> headings. Includes a commented-out POST request example against a JSON API. Demonstrates real HTTP interaction against a live server, not mocked data.

โšก Concurrent Image Downloader โ€” Day 98

Downloads 60 images in parallel using ProcessPoolExecutor. Handles directory creation, binary file writing, and exception isolation per worker โ€” a realistic pattern for batch data-fetching pipelines.


๐Ÿ› ๏ธ Setup & Usage

Requirements: Python 3.8+ (Days 86+), Python 3.10+ for match/case (Day 16)

Install dependencies:

pip install requests beautifulsoup4 pandas

Run any day's script:

cd "Day 39"
python main.py

CLI tool (Day 85):

cd Day_85
python main.py https://picsum.photos/800/600 -o photo.jpg

๐Ÿ“ˆ Learning Progression

Days  1โ€“20  โ–“โ–“โ–“โ–“โ–“โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  Syntax, types, control flow, functions
Days 21โ€“40  โ–‘โ–‘โ–‘โ–‘โ–“โ–“โ–“โ–“โ–“โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  Data structures, recursion, first projects
Days 41โ€“60  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–“โ–“โ–“โ–“โ–“โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  File I/O, modules, lambdas, decorators
Days 61โ€“80  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–“โ–“โ–“โ–“โ–“โ–‘โ–‘โ–‘  Full OOP โ€” inheritance, polymorphism, dunder methods
Days 81โ€“98  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–“โ–“โ–“โ–“  Concurrency, CLI, async, regex, web scraping

๐Ÿ”ง Tech Stack

Python requests BeautifulSoup4 asyncio threading


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages