diff --git a/docs/interactive-python-editor.md b/docs/interactive-python-editor.md
deleted file mode 100644
index c2f5798d..00000000
--- a/docs/interactive-python-editor.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-id: interactive-python-editor
-title: Interactive Python Editor
----
-
-import InteractivePythonEditor from '@site/src/components/InteractivePythonEditor';
-
-This page demonstrates the new interactive Python editor component. You can edit code on the left, see highlighted code on the right, and run it directly in the browser using Pyodide.
-
-
-
-Notes:
-- The editor loads Pyodide from a CDN — the first run will take a few seconds while the WebAssembly engine downloads.
-- This component is intentionally dependency-free (uses Prism for highlighting and Pyodide for execution via CDN). If you'd like tighter integration (Monaco, local Pyodide mirror, or server-side execution), I can update it.
diff --git a/docs/python/Data_Structures/python-array.md b/docs/python/Data_Structures/python-array.md
deleted file mode 100644
index 082fba40..00000000
--- a/docs/python/Data_Structures/python-array.md
+++ /dev/null
@@ -1,271 +0,0 @@
----
-id: python-array
-title: Array in Python
-sidebar_label: Array in Python #displays in sidebar
-sidebar_position: 9
-tags:
- [
- Python,
- Array in Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String
- ]
-
----
-
-# Arrays in Python
-
-An **Array** in Python is a data structure that stores multiple elements of the **same data type** in contiguous memory locations.
-Arrays are **ordered**, **mutable**, and **type-restricted**, making them more memory-efficient than lists for large numeric data.
-
-In Python, arrays are provided by the built-in **`array`** module, which must be imported before use.
-
----
-
-## Creating an Array
-
-You create an array using the `array()` constructor from the `array` module.
-
-```python
-import array
-
-# Empty array of integers
-empty_array = array.array('i', [])
-
-# Array of Integers
-numbers = array.array('i', [1, 2, 3, 4, 5])
-
-# Array of Floats
-floats = array.array('f', [1.1, 2.2, 3.3])
-
-print(numbers) # array('i', [1, 2, 3, 4, 5])
-```
-
----
-
-## Type Codes
-
-Arrays in Python require a **type code** to specify the element type:
-
-| Type Code | C Type | Python Type | Size (bytes) |
-| --------- | --------------- | ----------- | ------------ |
-| `'i'` | signed int | int | 2 or 4 |
-| `'I'` | unsigned int | int | 2 or 4 |
-| `'f'` | float | float | 4 |
-| `'d'` | double | float | 8 |
-| `'b'` | signed char | int | 1 |
-| `'B'` | unsigned char | int | 1 |
-| `'u'` | Py_UNICODE | Unicode | 2 |
-
----
-
-## Indexing
-
-Just like lists, arrays use **zero-based indexing**.
-
-```python
-nums = array.array('i', [10, 20, 30, 40, 50])
-
-print(nums[0]) # 10
-print(nums[2]) # 30
-print(nums[-1]) # 50
-```
-
----
-
-## Slicing
-
-You can slice arrays to get sub-arrays.
-
-```python
-print(nums[1:4]) # array('i', [20, 30, 40])
-print(nums[:3]) # array('i', [10, 20, 30])
-print(nums[::2]) # array('i', [10, 30, 50])
-```
-
-**Syntax:**
-
-```
-array[start:stop:step]
-```
-
----
-
-## Modifying Elements
-
-Arrays are **mutable**, so you can change elements:
-
-```python
-nums[1] = 99
-print(nums) # array('i', [10, 99, 30, 40, 50])
-```
-
----
-
-## Array Methods
-
-Python's `array` module provides several useful methods:
-
-| Method | Description |
-| ------------------ | ----------------------------------------------------- |
-| `append(x)` | Adds an element to the end |
-| `insert(i, x)` | Inserts an element at index `i` |
-| `extend(iterable)` | Adds elements from another iterable |
-| `remove(x)` | Removes the first occurrence of the item |
-| `pop([i])` | Removes and returns the item at index `i` |
-| `index(x)` | Returns the index of the first occurrence of the item |
-| `count(x)` | Counts how many times the item appears |
-| `reverse()` | Reverses the array |
-| `buffer_info()` | Returns a tuple (memory address, length) |
-| `tobytes()` | Converts the array to a bytes object |
-| `frombytes(b)` | Appends items from a bytes object |
-
----
-
-### Examples
-
-#### append()
-
-```python
-nums = array.array('i', [1, 2, 3])
-nums.append(4)
-print(nums) # array('i', [1, 2, 3, 4])
-```
-
-#### insert()
-
-```python
-nums.insert(1, 100)
-print(nums) # array('i', [1, 100, 2, 3, 4])
-```
-
-#### extend()
-
-```python
-nums.extend([5, 6])
-print(nums) # array('i', [1, 100, 2, 3, 4, 5, 6])
-```
-
-#### remove() and pop()
-
-```python
-nums.remove(100)
-print(nums) # array('i', [1, 2, 3, 4, 5, 6])
-
-nums.pop() # Removes last element
-print(nums) # array('i', [1, 2, 3, 4, 5])
-
-nums.pop(2) # Removes index 2
-print(nums) # array('i', [1, 2, 4, 5])
-```
-
----
-
-## Iterating Through an Array
-
-**Using a for loop:**
-
-```python
-for num in nums:
- print(num)
-```
-
-**Using indices:**
-
-```python
-for i in range(len(nums)):
- print(i, nums[i])
-```
-
----
-
-## Membership Test
-
-Check if an element exists in an array:
-
-```python
-print(10 in nums) # True or False
-print(100 not in nums) # True or False
-```
-
----
-
-## Array from List
-
-```python
-list_data = [1, 2, 3, 4]
-arr = array.array('i', list_data)
-print(arr)
-```
-
----
-
-## Copying Arrays
-
-Assigning directly creates a reference:
-
-```python
-a = array.array('i', [1, 2, 3])
-b = a
-b.append(4)
-print(a) # array('i', [1, 2, 3, 4])
-```
-
-To make an independent copy:
-
-```python
-c = array.array(a.typecode, a)
-c.append(5)
-
-print(a) # array('i', [1, 2, 3, 4])
-print(c) # array('i', [1, 2, 3, 4, 5])
-```
-
----
-
-### **Practice Questions**
-
-1. **Basic Traversal**
-
- **Q1**: Write a Python program to traverse an array and print each element on a new line.
-
-2. **Maximum Element**
-
- **Q2:** Write a Python program to find the maximum and minimum elements in an array without using built-in functions.
-
-3. **Array Reversal**
-
- **Q3:** Write a Python program to reverse an array without using slicing or the reverse() method.
-
-
-4. **Insertion Operation**
-
- **Q4:** Write a Python program to insert an element at a specific index in an array.
-
-
-5. **Deletion Operation**
-
- **Q5:** Write a Python program to delete an element from a given index in an array.
-
-6. **Search Element**
-
- **Q6:** Write a Python program to search for a given element in an array and print its index if found, otherwise print "Not Found".
-
-7. **Sum of Elements**
-
- **Q7:** Write a Python program to find the sum of all elements in an array without using the sum() function.
-
-8. **Second Largest Element**
-
- **Q8:** Write a Python program to find the second largest element in an array.
-
----
-
-## Conclusion
-
-Python Arrays are useful when you need to store large amounts of **numeric data** of the same type efficiently.
-They provide faster performance and smaller memory footprint compared to lists for numerical operations.
diff --git a/docs/python/Data_Structures/python-linked-list.md b/docs/python/Data_Structures/python-linked-list.md
deleted file mode 100644
index 22e4ab95..00000000
--- a/docs/python/Data_Structures/python-linked-list.md
+++ /dev/null
@@ -1,174 +0,0 @@
-# Linked List in Python
-
-A **Linked List** is a fundamental **linear data structure** where elements are **not** stored at contiguous memory locations (unlike arrays or Python lists). Instead, the elements, called **Nodes**, are linked together using **pointers** or **references**.
-
-This structure allows for highly efficient **insertions** and **deletions** compared to arrays, where these operations can be slow.
-
----
-
-## Structure of a Linked List
-
-The linked list is built upon two core concepts:
-
-1. **Node:** The basic building block, which contains:
- * **Data:** The value stored.
- * **Next Pointer (`next`):** The reference to the next node in the sequence.
-2. **Head:** A pointer to the very first node in the list. It is the entry point for all operations. The last node's `next` pointer always points to **`None`**.
-
-### Real-Life Analogy
-
-Think of a **treasure hunt or a chain of clues**. Each clue (**Node**) holds the information (**Data**) and a direction to the next clue (**Next Pointer**). You must follow the chain from the beginning (**Head**) to find the end.
-
----
-
-## Python Implementation: The Node Class
-
-Since Python doesn't have a built-in linked list type, we define its structure using classes.
-
-The `Node` class defines the element structure.
-
-```python
-class Node:
- """Represents a single element in the linked list."""
- def __init__(self, data):
- # Store the data
- self.data = data
- # Initialize the pointer to the next node
- self.next = None
-```
-
-## Python Implementation: The LinkedList Class
-
-The `LinkedList` class manages the list, primarily by keeping track of the `head`.
-
-```python
-class LinkedList:
- """Manages the linked list and its head pointer."""
- def __init__(self):
- # Initialize the list's entry point
- self.head = None
-```
-
-### Traversal: Printing the List
-
-To traverse, we start at the head and loop until the current node becomes None, updating the current node with its next pointer in each iteration.
-
-```python
-class LinkedList:
- # __init__ and Node class definition here
-
- def print_list(self):
- current_node = self.head
- print("List:", end=" ")
- while current_node is not None:
- print(current_node.data, end=" -> ")
- current_node = current_node.next
- print("None")
-```
-***Example***
-
-```python
-my_list = LinkedList()
-my_list.head = Node(10)
-second = Node(20)
-third = Node(30)
-
-# Linking the nodes: 10 -> 20 -> 30 -> None
-my_list.head.next = second
-second.next = third
-my_list.print_list()
-```
-
-**Output:**
-
-```
-List: 10 -> 20 -> 30 -> None
-```
-
-### Insertion Operations
-
-#### 1. Insertion at the Beginning (Prepend)
-
-It only requires updating the head pointer.
-
-```python
-def insert_at_beginning(self, new_data):
- # Create a new node
- new_node = Node(new_data)
-
- # Make the new node's next pointer point to the current head
- new_node.next = self.head
-
- # Update the list's head to point to the new node
- self.head = new_node
-```
-
-***Example***
-
-```python
-my_list.insert_at_beginning(5)
-my_list.print_list()
-```
-
-**Output:**
-
-```
-List: 5-> 10 -> 20 -> 30 -> None
-```
-
-#### 2. Insertion After a Node
-
-```python
-def insert_after(self, prev_node, new_data):
- if prev_node is None:
- print("Previous node cannot be None.")
- return
-
- # Create the new node
- new_node = Node(new_data)
-
- # Set new node's next to the previous node's next
- new_node.next = prev_node.next
-
- # Set the previous node's next to the new node
- prev_node.next = new_node
-```
-
-***Example***
-
-```python
-my_list.insert_after(my_list.head, 15)
-my_list.print_list()
-```
-
-**Output:**
-
-```
-List: 5-> 15-> 10 -> 20 -> 30 -> None
-```
-
-### Deletion Operation
-
-Deleting the Head
-
-```python
-def delete_head(self):
- if self.head is None:
- return
-
- # Move the head to the next node, which effectively "deletes" the old head
- self.head = self.head.next
-```
-
-***Example***
-
-```python
-my_list.delete_head() # Deletes head (5)
-my_list.print_list()
-```
-
-**Output:**
-
-```
-List: 15-> 10 -> 20 -> 30 -> None
-```
\ No newline at end of file
diff --git a/docs/python/Data_Structures/python-queue.md b/docs/python/Data_Structures/python-queue.md
deleted file mode 100644
index 7f9d3502..00000000
--- a/docs/python/Data_Structures/python-queue.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# Queue in Python
-
-A **Queue** is a linear data structure that follows a specific order for all operations. This order is based on the **First-In, First-Out (FIFO)** principle.
-
-Imagine a ticket line: the first person to join the line is the first person to be served and leave.
-
----
-
-## Queue Operations
-
-Queues have two distinct ends where operations occur: the **Rear** (for insertion) and the **Front** (for removal).
-
-| Operation | Description | Analogy |
-| :--- | :--- | :--- |
-| **Enqueue** | Adds an element to the **Rear**. | Joining the back of the line. |
-| **Dequeue** | Removes an element from the **Front**. | Leaving the front of the line. |
-| **Peek** | Returns the front element without removing it. | Looking at the person next in line. |
-
----
-
-## Queue Operations Using Python List
-
-In the simplest Python implementation, we use a built-in **`list`** as the underlying storage. For a true FIFO queue:
-
-* **Enqueue** is performed using `list.append()` (at the rear/end).
-* **Dequeue** is performed using `list.pop(0)` (from the front/start).
-* **Peek** is performed using list indexing `list[0]` (at the fromt/start).
-
-### The Queue Class
-
-```python
-class Queue:
- """Implements a Queue using the FIFO principle with a Python list."""
- def __init__(self):
- # The storage container for the queue elements
- self._items = []
-
- def is_empty(self):
- """Check if the queue is empty."""
- return not self._items
-
- def enqueue(self, data):
- """Adds an element to the rear of the queue (list.append()). (O(1))"""
- self._items.append(data)
- print(f"Enqueued: {data}")
-
- def dequeue(self):
- """Removes and returns the front element (list.pop(0)). (O(N))"""
- if self.is_empty():
- raise IndexError("Error: Cannot dequeue from an empty queue.")
-
- # pop(0) removes the first item (the front of the queue)
- return self._items.pop(0)
-
- def peek(self):
- """Returns the front element without removing it."""
- if self.is_empty():
- raise IndexError("Error: Cannot peek at an empty queue.")
-
- # Access the first item (0 index)
- return self._items[0]
-```
-
-***Example***
-
-```python
-my_queue = Queue()
-my_queue.enqueue("Task 1")
-my_queue.enqueue("Task 2")
-my_queue.enqueue("Task 3")
-
-print("\nFront element (Peek):", my_queue.peek())
-
-served_item = my_queue.dequeue()
-print("Dequeued element:", served_item)
-
-print("Queue Status:", my_queue._items)
-
-my_queue.dequeue()
-my_queue.dequeue()
-
-# my_queue.dequeue() # Uncommenting this line will raise an IndexError
-```
-
-**Output**:
-
-```
-Enqueued: Task 1
-Enqueued: Task 2
-Enqueued: Task 3
-
-Front element (Peek): Task 1
-Dequeued element: Task 1
-Queue Status: ['Task 2', 'Task 3']
-```
\ No newline at end of file
diff --git a/docs/python/Data_Structures/python-stack.md b/docs/python/Data_Structures/python-stack.md
deleted file mode 100644
index 905e7571..00000000
--- a/docs/python/Data_Structures/python-stack.md
+++ /dev/null
@@ -1,99 +0,0 @@
-# Stack in Python
-
-A **Stack** is a linear data structure that follows a specific order for all operations. This order is based on the **Last-In, First-Out (LIFO)** principle.
-
-Imagine a stack of plates: you can only add a new plate to the top, and you can only remove the plate that is currently on the top.
-
----
-
-## Stack Operations
-
-A stack has three primary operations, all of which occur at the **Top** of the stack:
-
-1. `Push`: **Adds** an element to the top of the stack.
-2. `Pop`: **Removes** and returns the element from the top of the stack.
-3. `Peek`: **Returns** the element at the top.
-
-| Operation | Description | Analogy |
-| :--- | :--- | :--- |
-| **Push** | Add element to the **Top** | Placing a plate on top of the stack |
-| **Pop** | Remove element from the **Top** | Taking the top plate off the stack |
-| **Peek** | View the element at the **Top** | Looking at the top plate |
-
----
-
-## Stack Operations Using Python
-ListIn the simplest Python implementation, we use a built-in list as the underlying storage. For a true LIFO stack, all primary operations are performed at the end of the list:
-
-* **Push** is performed using `list.append()`.
-* **Pop** is performed using `list.pop()`.
-* **Peek** is performed using list indexing `list[-1]`.
-
----
-## The Stack Class
-
-```python
-class Stack:
- """Implements a Stack using the LIFO principle with a Python list."""
- def __init__(self):
- # The storage container for the stack elements
- self._items = []
-
- def is_empty(self):
- """Check if the stack is empty."""
- return not self._items
-
- def push(self, data):
- """Adds an element to the top of the stack (list.append())."""
- self._items.append(data)
- print(f"Pushed: {data}")
-
- def pop(self):
- """Removes and returns the top element (list.pop())."""
- if self.is_empty():
- raise IndexError("Error: Cannot pop from an empty stack.")
-
- # Pop removes the last item (the top of the stack)
- return self._items.pop()
-
- def peek(self):
- """Returns the top element without removing it."""
- if self.is_empty():
- raise IndexError("Error: Cannot peek at an empty stack.")
-
- # Access the last item (-1 index)
- return self._items[-1]
-```
-
-***Example***
-
-```python
-my_stack = Stack()
-my_stack.push("A")
-my_stack.push("B")
-my_stack.push("C")
-
-print("\nTop element (Peek):", my_stack.peek())
-
-removed_item = my_stack.pop()
-print("Popped element:", removed_item)
-
-print("Current size:", len(my_stack._items))
-
-my_stack.pop()
-my_stack.pop()
-
-# my_stack.pop() # Uncommenting this line will raise an IndexError
-```
-
-**Output**:
-
-```
-Pushed: A
-Pushed: B
-Pushed: C
-
-Top element (Peek): C
-Popped element: C
-Current size: 2
-```
\ No newline at end of file
diff --git a/docs/python/_category_.json b/docs/python/_category_.json
deleted file mode 100644
index 5e82e53f..00000000
--- a/docs/python/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "Python",
- "position": 4,
- "link": {
- "type": "generated-index",
- "description": "Python is a high-level, interpreted programming language known for its clean syntax and code readability. It supports multiple programming paradigms including procedural, object-oriented, and functional programming. Python is widely used in web development, data science, machine learning, automation, and scripting. Its simplicity and versatility make it one of the most popular languages for beginners and professionals alike."
- }
-}
diff --git a/docs/python/assets/data-type.png b/docs/python/assets/data-type.png
deleted file mode 100644
index 98e96c6a..00000000
Binary files a/docs/python/assets/data-type.png and /dev/null differ
diff --git a/docs/python/assets/image-1.png b/docs/python/assets/image-1.png
deleted file mode 100644
index 215f157d..00000000
Binary files a/docs/python/assets/image-1.png and /dev/null differ
diff --git a/docs/python/assets/image-2.png b/docs/python/assets/image-2.png
deleted file mode 100644
index a4be1356..00000000
Binary files a/docs/python/assets/image-2.png and /dev/null differ
diff --git a/docs/python/assets/img-3.png b/docs/python/assets/img-3.png
deleted file mode 100644
index c572e128..00000000
Binary files a/docs/python/assets/img-3.png and /dev/null differ
diff --git a/docs/python/assets/img-4.png b/docs/python/assets/img-4.png
deleted file mode 100644
index f61379d4..00000000
Binary files a/docs/python/assets/img-4.png and /dev/null differ
diff --git a/docs/python/assets/setupimg1.png b/docs/python/assets/setupimg1.png
deleted file mode 100644
index 10dd9dc9..00000000
Binary files a/docs/python/assets/setupimg1.png and /dev/null differ
diff --git a/docs/python/assets/setupimg2.png b/docs/python/assets/setupimg2.png
deleted file mode 100644
index 8bda8baa..00000000
Binary files a/docs/python/assets/setupimg2.png and /dev/null differ
diff --git a/docs/python/assets/setupimg3.png b/docs/python/assets/setupimg3.png
deleted file mode 100644
index 88d95cdf..00000000
Binary files a/docs/python/assets/setupimg3.png and /dev/null differ
diff --git a/docs/python/assets/setupimg4.png b/docs/python/assets/setupimg4.png
deleted file mode 100644
index a5c7d9da..00000000
Binary files a/docs/python/assets/setupimg4.png and /dev/null differ
diff --git a/docs/python/assets/setupimg5.png b/docs/python/assets/setupimg5.png
deleted file mode 100644
index 7d6345be..00000000
Binary files a/docs/python/assets/setupimg5.png and /dev/null differ
diff --git a/docs/python/assets/setupimg6.png b/docs/python/assets/setupimg6.png
deleted file mode 100644
index c30fff16..00000000
Binary files a/docs/python/assets/setupimg6.png and /dev/null differ
diff --git a/docs/python/assets/setupimg7.png b/docs/python/assets/setupimg7.png
deleted file mode 100644
index ca8db09e..00000000
Binary files a/docs/python/assets/setupimg7.png and /dev/null differ
diff --git a/docs/python/assets/setupimg8.png b/docs/python/assets/setupimg8.png
deleted file mode 100644
index e7d14099..00000000
Binary files a/docs/python/assets/setupimg8.png and /dev/null differ
diff --git a/docs/python/conditional-statements-python.md b/docs/python/conditional-statements-python.md
deleted file mode 100644
index 6c2b0c9b..00000000
--- a/docs/python/conditional-statements-python.md
+++ /dev/null
@@ -1,238 +0,0 @@
----
-id: python-conditional-statements
-title: Conditional Statements in Python
-sidebar_label: Conditional Statements in Python
-sidebar_position: 9
-tags:
- [
- Python,
- Conditional Statements,
- if else,
- elif,
- Control Flow,
- Python Syntax
- ]
-
----
-
-# Conditional Statements in Python
-
-Conditional statements in Python allow you to make decisions in your code. They control the flow of execution depending on whether a given condition is **True** or **False**.
-
----
-
-## The `if` Statement
-
-The simplest conditional statement is the `if` statement.
-
-**Syntax:**
-
-```python
-if condition:
- # block of code
-```
-
-**Example:**
-
-```python
-x = 10
-if x > 5:
- print("x is greater than 5")
-```
-
----
-
-## The `if...else` Statement
-
-The `else` block runs when the `if` condition is **False**.
-
-```python
-x = 3
-if x > 5:
- print("x is greater than 5")
-else:
- print("x is less than or equal to 5")
-```
-
-**Output:**
-```
-x is less than or equal to 5
-```
-
----
-
-## The `if...elif...else` Statement
-
-`elif` stands for "else if". It lets you check multiple conditions.
-
-```python
-score = 85
-
-if score >= 90:
- print("Grade A")
-elif score >= 75:
- print("Grade B")
-elif score >= 60:
- print("Grade C")
-else:
- print("Grade D")
-```
-
----
-
-## Nested `if` Statements
-
-You can put an `if` statement inside another `if` statement.
-
-```python
-x = 15
-if x > 10:
- if x < 20:
- print("x is between 10 and 20")
-```
-
----
-
-## Conditional Expressions (Ternary Operator)
-
-Python has a shorter way to write `if...else` using **ternary expressions**.
-
-```python
-age = 18
-status = "Adult" if age >= 18 else "Minor"
-print(status)
-```
-
-**Output:**
-```
-Adult
-```
-
----
-
-## Logical Operators in Conditions
-
-You can combine multiple conditions using `and`, `or`, and `not`.
-
-```python
-x = 7
-if x > 5 and x < 10:
- print("x is between 5 and 10")
-
-if x < 5 or x > 10:
- print("x is outside 5 to 10")
-
-if not x == 8:
- print("x is not 8")
-```
-
----
-
-## Comparing Multiple Values
-
-You can check if a value exists in a sequence using `in`.
-
-```python
-fruits = ["apple", "banana", "cherry"]
-if "apple" in fruits:
- print("Apple is in the list")
-```
-
----
-
-## Indentation Rules
-
-In Python, indentation is important for defining code blocks.
-
-```python
-if True:
- print("This is indented correctly")
- print("Still inside if block")
-print("Outside if block")
-```
-
----
-
-## Summary Table
-
-| Statement Type | Description |
-|------------------------|------------------------------------------|
-| `if` | Executes a block if condition is `True` |
-| `if...else` | Executes `else` block if condition is `False` |
-| `if...elif...else` | Checks multiple conditions |
-| Nested `if` | `if` inside another `if` |
-| Ternary Expression | Short form of `if...else` |
-
-
-### **Practice Questions**
-
-#### 1. **Positive / Negative / Zero Checker**
-
-Write a Python program that takes a number as input and checks whether it is **positive**, **negative**, or **zero**.
-
-
-#### 2. **Odd or Even**
-
-Write a Python program to check whether a number is **even** or **odd**.
-
-
-#### 3. **Age Eligibility for Voting**
-
-Write a program to take a person’s age as input and check if they are **eligible to vote** (18 years or older).
-
-
-#### 4. **Largest of Two Numbers**
-
-Write a Python program that takes two numbers as input and prints the **larger number** using conditional statements.
-
-
-#### 5. **Largest of Three Numbers**
-
-Write a Python program to find the **largest among three numbers** entered by the user using `if`, `elif`, and `else`.
-
-
-#### 6. **Grading System**
-
-Write a Python program to take a student's marks as input and print the **grade** according to the following criteria:
-
-* Marks ≥ 90 → Grade A
-* Marks ≥ 75 and < 90 → Grade B
-* Marks ≥ 50 and < 75 → Grade C
-* Marks < 50 → Grade F
-
-
-#### 7. **Leap Year Checker**
-
-Write a program to check whether a given year is a **leap year** or not.
-*(Hint: A year is leap if divisible by 4 but not 100, or divisible by 400)*
-
-
-#### 8. **Nested If — Number Range Checker**
-
-Write a program that takes a number as input and:
-
-* Checks if it's **positive**.
-* If positive, further checks if it is **less than 10**, **between 10 and 50**, or **greater than 50**.
-
-
-#### 9. **Character Classification**
-
-Write a program to input a single character and check whether it is:
-
-* a **vowel**,
-* a **consonant**,
-* a **digit**, or
-* a **special character**.
-
-
-#### 10. **Login Authentication (Simple)**
-
-Write a program that asks the user to enter a **username** and **password**.
-
-* If the username is `"admin"` and the password is `"12345"`, print **“Login Successful”**.
-* Otherwise, print **“Invalid credentials”**.
-
-
-## Conclusion
-
-Conditional statements are essential for decision-making in programs. Mastering `if`, `elif`, and `else` allows you to control your program's logic effectively.
diff --git a/docs/python/datatype-python.md b/docs/python/datatype-python.md
deleted file mode 100644
index bc84d704..00000000
--- a/docs/python/datatype-python.md
+++ /dev/null
@@ -1,212 +0,0 @@
----
-id: datatype-python
-title: Python Data Types
-sidebar_label: Python Data Types #displays in sidebar
-sidebar_position: 4
-tags:
- [
- python,
- introduction of python,
- Data Type,
-
- ]
-description: Learn all standard data types in Python with examples and explanations.
-
----
-
-
-# Python Data Types
-
-In Python, every value has a **data type**. Data types define the nature of a value, and Python provides a wide variety of built-in data types to handle different kinds of data. Understanding these is crucial for effective programming.
-
----
-
-## Data Types in Python
-
-| **Category** | **Data Type** |
-|------------------|----------------------------------------|
-| Text Type | `str` |
-| Numeric Types | `int`, `float`, `complex` |
-| Sequence Types | `list`, `tuple`, `range` |
-| Mapping Type | `dict` |
-| Set Types | `set`, `frozenset` |
-| Boolean Type | `bool` |
-| Binary Types | `bytes`, `bytearray`, `memoryview` |
-| None Type | `NoneType` |
-
----
-
-## Text Type: `str`
-
-A sequence of Unicode characters.
-
-```python
-name = "Dhruba"
-````
-
-You can perform operations like:
-
-* Slicing
-* Concatenation
-* Length check with `len()`
-
----
-
-## Numeric Types
-
-### `int`
-
-Whole numbers:
-
-```python
-age = 25
-```
-
-### `float`
-
-Decimal numbers:
-
-```python
-pi = 3.14
-```
-
-### `complex`
-
-Numbers with real and imaginary parts:
-
-```python
-z = 2 + 3j
-```
-
----
-
-## Sequence Types
-
-### `list`
-
-Mutable, ordered sequence:
-
-```python
-fruits = ["apple", "banana", "cherry"]
-```
-
-### `tuple`
-
-Immutable, ordered sequence:
-
-```python
-dimensions = (1024, 768)
-```
-
-### `range`
-
-Represents a sequence of numbers:
-
-```python
-nums = range(5)
-```
-
----
-
-## Mapping Type: `dict`
-
-Unordered collection of key-value pairs:
-
-```python
-person = {
- "name": "Alice",
- "age": 30
-}
-```
-
----
-
-## Set Types
-
-### `set`
-
-Unordered, mutable, no duplicates:
-
-```python
-unique_ids = {1, 2, 3}
-```
-
-### `frozenset`
-
-Immutable version of a set:
-
-```python
-readonly_ids = frozenset([1, 2, 3])
-```
-
----
-
-## Boolean Type: `bool`
-
-Only `True` or `False`:
-
-```python
-is_active = True
-```
-
----
-
-## Binary Types
-
-### `bytes`
-
-Immutable byte sequence:
-
-```python
-b = b"Hello"
-```
-
-### `bytearray`
-
-Mutable version:
-
-```python
-ba = bytearray([65, 66, 67])
-```
-
-### `memoryview`
-
-Provides memory-efficient access:
-
-```python
-mv = memoryview(bytes([1, 2, 3]))
-```
-
----
-
-## None Type
-
-Represents no value:
-
-```python
-response = None
-```
-
----
-
-## Type Checking and Conversion
-
-### Check type
-
-```python
-type(3.14) # Output:
-```
-
-### Type Conversion
-
-```python
-int("5") # Output: 5
-str(10) # Output: "10"
-list("abc") # Output: ['a', 'b', 'c']
-```
-
----
-
-## Conclusion
-
-Python provides a variety of built-in data types to handle data in efficient and expressive ways. Knowing when and how to use each data type is essential for writing clean and effective Python code.
\ No newline at end of file
diff --git a/docs/python/intro-python.md b/docs/python/intro-python.md
deleted file mode 100644
index 55505891..00000000
--- a/docs/python/intro-python.md
+++ /dev/null
@@ -1,100 +0,0 @@
----
-id: intro-python
-title: Introduction of Python
-sidebar_label: Introduction of Python #displays in sidebar
-sidebar_position: 1
-tags:
- [
- python,
- introduction of python,
- what is html,
-
- ]
-description: In this tutorial, you will learn about Python, its key features, why Python is so popular, how to write Python code, how to set up the environment, Python syntax compared to other languages, and more.
-
----
-
-Python is a high-level, interpreted, and general-purpose programming language. It was created by **Guido van Rossum** and first released in **1991**. Python's simple syntax, readability, and vast ecosystem of libraries make it one of the most popular programming languages in the world today.
-
-
-### Key Features of Python
-
-- **Easy to Learn and Use** – Python has a clean and straightforward syntax similar to English.
-- **Interpreted Language** – No need to compile code before running.
-- **Dynamically Typed** – No need to declare variable types explicitly.
-- **Extensive Libraries** – Huge collection of standard and third-party libraries.
-- **Cross-platform** – Python code can run on Windows, macOS, Linux, and more.
-- **Community Support** – One of the largest and most active programming communities.
-
-
-### What Can You Do with Python?
-
-- **Web Development** – Frameworks like Django, Flask.
-- **Data Science and Machine Learning** – Libraries like NumPy, pandas, scikit-learn, TensorFlow.
-- **Scripting and Automation** – Automate daily tasks and processes.
-- **Game Development** – Libraries like Pygame.
-- **Desktop Applications** – GUI development with Tkinter or PyQt.
-- **Cybersecurity and Ethical Hacking** – Tools like Scapy, Nmap integrations.
-
----
-
-### Python Syntax Example
-
-Here is a simple Python program that prints "Hello, World!":
-
-
-```python
-print("Hello, World!")
-````
-
- Output:
-
-```
-Hello, World!
-```
-
-You can run this code in any Python interpreter, and it will display the message on the screen.
-
-
-### Good to know
-
-1. The most recent major version of Python is **Python 3**, which is the version used in most tutorials today. Although **Python 2** is no longer maintained, it is still used in some legacy systems.
-2. Python files use the **`.py`** extension.
-3. You can write Python code in a text editor or an IDE like **VS Code**, **PyCharm**, **Thonny**, or **Jupyter Notebook**.
-4. Python is widely used in both academic research and industry for automating tasks, analyzing data, building applications, and more.
-
-
-### 📦 Installing Python
-
-1. Visit the [official Python website](https://www.python.org/downloads/)
-2. Download the installer for your operating system.
-3. Follow the installation instructions.
-4. Verify installation by typing `python --version` in the terminal or command prompt.
-
-
-### Why is Python so Popular?
-
-Python has gained massive popularity across industries and educational institutions because of the following reasons:
-
-* **Simple and Readable Syntax**
- Python’s syntax is easy to read and write, similar to plain English, making it beginner-friendly.
-
-* **Versatile and Multi-purpose**
- Python is used in various fields including web development, data analysis, machine learning, artificial intelligence, automation, scripting, and more.
-
-* **Large Standard Library and Ecosystem**
- Python offers a rich standard library and thousands of third-party packages (like NumPy, Pandas, Flask, Django, TensorFlow, etc.) to build anything from simple scripts to complex systems.
-
-* **Cross-platform Compatibility**
- Python runs on all major operating systems (Windows, macOS, Linux) making it accessible and flexible.
-
-* **Strong Community Support**
- Python has a huge global community, active forums, and abundant learning resources for beginners and professionals alike.
-
-* **Used by Top Companies**
- Companies like Google, Netflix, Facebook, NASA, and Dropbox use Python for various applications, proving its reliability and scalability.
-
-
-## Conclusion
-
-Python is a powerful and versatile programming language that is easy to learn and widely used across different domains. Its simple syntax, vast libraries and strong community support make it an excellent choice for both beginners and experienced developers.
diff --git a/docs/python/python-casting.md b/docs/python/python-casting.md
deleted file mode 100644
index 05033c1c..00000000
--- a/docs/python/python-casting.md
+++ /dev/null
@@ -1,102 +0,0 @@
----
-id: python-casting
-title: Type Casting
-sidebar_label: Type Casting #displays in sidebar
-sidebar_position: 6
-tags:
- [
- Python,
- Introduction of python,
- Python Syntax,
- Python Variables,
- Python Operators,
- Type Casting,
-
- ]
-
----
-
-# Type Casting
-
-In Python, **casting** is the process of converting a variable from one type to another. Python has built-in functions for converting between data types.
-
----
-
-### Specify a Variable Type
-
-Python is an **object-oriented language**, and **variables are objects**.
-You can specify the data type using casting functions:
-
-```python
-x = int(1) # x will be 1
-y = int(2.8) # y will be 2
-z = int("3") # z will be 3
-````
-
-
-### `int()` - Integer Casting
-
-Converts a value to an integer. Works with floats and numeric strings.
-
-```python
-x = int(1) # 1
-y = int(2.8) # 2
-z = int("3") # 3
-# w = int("abc") # Error
-```
-
-
-### `float()` - Floating-Point Casting
-
-Converts a value to a float. Works with integers and numeric strings.
-
-```python
-a = float(1) # 1.0
-b = float("2.5") # 2.5
-c = float(3.0) # 3.0
-```
-
-
-### `str()` - String Casting
-
-Converts numbers or other types into a string.
-
-```python
-x = str("s1") # 's1'
-y = str(2) # '2'
-z = str(3.0) # '3.0'
-```
-
-### Invalid Casting
-
-Some values can't be casted directly:
-
-```python
-int("hello") # ValueError
-float("abc") # ValueError
-```
-
-Use `try`/`except` to handle safely:
-
-```python
-value = "abc"
-try:
- number = int(value)
-except ValueError:
- print("Invalid conversion")
-```
-
-### Summary Table
-
-| Function | Converts to | Example Input | Output |
-| --------- | ----------- | ------------- | ------- |
-| `int()` | Integer | `"3"` | `3` |
-| `float()` | Float | `"3.5"` | `3.5` |
-| `str()` | String | `3.5` | `"3.5"` |
-
-
-### Quick Notes
-
-* Use casting to convert types manually.
-* Useful when handling user input, math, or data from files.
-* Always validate input before casting to avoid errors.
diff --git a/docs/python/python-constructor.md b/docs/python/python-constructor.md
deleted file mode 100644
index f571f282..00000000
--- a/docs/python/python-constructor.md
+++ /dev/null
@@ -1,180 +0,0 @@
----
-id: python-constructor
-title: Python Constructor
-sidebar_label: Python Constructor #displays in sidebar
-description: Learn about constructors in Python OOP, including the __init__ method, types of constructors, and real-world use cases.
-sidebar_position: 19
-tags:
- [
- Python,
- List in Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String,
- Tuple in Python
- Array in Python
- Functions in Python
- Recursion in Python
- Opps in Python
- ]
----
-
-# Constructor in Python
-
-In Python, a **constructor** is a special method used to initialize the newly created object of a class. It is called automatically when a new object is created.
-
-The most commonly used constructor in Python is the `__init__()` method.
-
----
-
-## What is a Constructor?
-
-A **constructor** is a special method in a class that is automatically called when an object is instantiated. It allows you to define and initialize the attributes of the object.
-
-```python
-class Person:
- def __init__(self, name, age):
- self.name = name
- self.age = age
-
-# Creating an object
-p1 = Person("Alice", 25)
-
-print(p1.name) # Output: Alice
-print(p1.age) # Output: 25
-````
-
-In the above example, `__init__()` is the constructor. It takes `name` and `age` as parameters and assigns them to the object's attributes.
-
----
-
-## Syntax of `__init__()` Constructor
-
-```python
-def __init__(self, parameters):
- # initialization code
-```
-
-* `self` refers to the current instance of the class.
-* You can pass additional parameters to set initial values for the object.
-
----
-
-## Types of Constructors in Python
-
-### 1. Default Constructor
-
-A constructor that takes only the `self` argument.
-
-```python
-class Demo:
- def __init__(self):
- print("This is a default constructor")
-
-obj = Demo()
-```
-
-### 2. Parameterized Constructor
-
-A constructor that takes additional arguments to initialize the object.
-
-```python
-class Student:
- def __init__(self, name, grade):
- self.name = name
- self.grade = grade
-
-s1 = Student("Ravi", "A")
-print(s1.name) # Output: Ravi
-print(s1.grade) # Output: A
-```
-
----
-
-## Constructor with Default Values
-
-You can also define default values for constructor parameters.
-
-```python
-class Car:
- def __init__(self, brand="Tesla"):
- self.brand = brand
-
-car1 = Car()
-car2 = Car("BMW")
-
-print(car1.brand) # Output: Tesla
-print(car2.brand) # Output: BMW
-```
-
----
-
-## Constructor in Inheritance
-
-When using inheritance, the constructor of the base class can be called using `super()`.
-
-```python
-class Animal:
- def __init__(self, species):
- self.species = species
-
-class Dog(Animal):
- def __init__(self, species, name):
- super().__init__(species)
- self.name = name
-
-d = Dog("Mammal", "Buddy")
-print(d.species) # Output: Mammal
-print(d.name) # Output: Buddy
-```
-
----
-
-## Real-World Use Case: Managing a Library System
-
-### Use Case: Library Book Management
-
-Suppose you're building a **Library Management System** where each book has the following data: title, author, and availability status.
-
-A constructor helps **initialize** the book’s data automatically when a book object is created.
-
-```python
-class Book:
- def __init__(self, title, author, available=True):
- self.title = title
- self.author = author
- self.available = available
-
- def display_info(self):
- status = "Available" if self.available else "Checked Out"
- print(f"{self.title} by {self.author} - {status}")
-
-# Creating books
-book1 = Book("1984", "George Orwell")
-book2 = Book("The Alchemist", "Paulo Coelho", available=False)
-
-book1.display_info() # Output: 1984 by George Orwell - Available
-book2.display_info() # Output: The Alchemist by Paulo Coelho - Checked Out
-```
-
-### Why Constructor is Important Here?
-
-* Ensures every book created has all the necessary data.
-* Automatically sets a default availability status (e.g., available = True).
-* Prevents manual initialization after creating the object.
-* Keeps the code clean, consistent, and modular.
-
-Without a constructor, you'd have to write multiple lines of code every time a book is created, which can lead to errors and duplication.
-
----
-
-## Summary
-
-* Constructors are used to initialize object properties at the time of creation.
-* Python uses the `__init__()` method as a constructor.
-* Constructors can be default, parameterized, or inherited.
-* They improve code organization and reduce repetition.
-* Real-world use cases like Library Systems, Inventory Management, User Registration, etc., rely heavily on constructors for clean initialization.
\ No newline at end of file
diff --git a/docs/python/python-dictionaries.md b/docs/python/python-dictionaries.md
deleted file mode 100644
index 07c84ab8..00000000
--- a/docs/python/python-dictionaries.md
+++ /dev/null
@@ -1,220 +0,0 @@
----
-id: python-dictionaries
-title: Python Dictionaries
-description: Complete theoretical explanation of dictionaries in Python, covering creation, modification, methods, and use-cases.
-sidebar_label: Python Dictionaries #displays in sidebar
-sidebar_position: 11
-tags:
- [
- Python,
- Introduction of python,
- List in Python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String,
- Tuple in Python,
- Python Dictionaries
-
- ]
-
----
-
-
-# Python Dictionaries
-
-A **dictionary** in Python is an unordered, mutable, and indexed collection of key-value pairs. It is one of the most powerful and flexible built-in data structures in Python, suitable for representing structured data.
-
-## What is a Dictionary?
-
-Dictionaries hold data in the form of key-value pairs. Each key is unique and maps to a specific value. Values can be of any data type, while keys must be immutable (like strings, numbers, or tuples).
-
-### Example:
-```python
-person = {
- "name": "Alice",
- "age": 25,
- "city": "New York"
-}
-````
-
-## Properties of Dictionaries
-
-* Keys are unique.
-* Keys must be immutable.
-* Values can be of any data type.
-* Dictionaries are mutable and can be changed after creation.
-* In Python 3.7+, dictionaries maintain insertion order.
-
-## Creating Dictionaries
-
-### Using Curly Braces:
-
-```python
-data = {"a": 1, "b": 2}
-```
-
-### Using the `dict()` Constructor:
-
-```python
-data = dict(x=10, y=20)
-```
-
-### Creating an Empty Dictionary:
-
-```python
-empty = {}
-```
-
-## Accessing Dictionary Elements
-
-### Using Key Indexing:
-
-```python
-person["name"]
-```
-
-### Using `get()` Method:
-
-```python
-person.get("age")
-person.get("gender", "Not Found")
-```
-
-## Adding and Updating Items
-
-### Add New Key-Value:
-
-```python
-person["gender"] = "Female"
-```
-
-### Update Existing Key:
-
-```python
-person["age"] = 30
-```
-
-### Use `update()` Method:
-
-```python
-person.update({"age": 35, "city": "Chicago"})
-```
-
-## Removing Elements
-
-### Using `pop()`:
-
-```python
-person.pop("age")
-```
-
-### Using `del`:
-
-```python
-del person["city"]
-```
-
-### Using `clear()`:
-
-```python
-person.clear()
-```
-
-### Using `popitem()`:
-
-Removes and returns the last inserted key-value pair.
-
-```python
-person.popitem()
-```
-
-## Dictionary Methods
-
-| Method | Description |
-| ----------- | ------------------------------------------------ |
-| `get(key)` | Returns value for key or `None` if key not found |
-| `keys()` | Returns a view of all keys |
-| `values()` | Returns a view of all values |
-| `items()` | Returns a view of key-value pairs |
-| `update()` | Updates dictionary with another dictionary |
-| `pop(key)` | Removes specified key |
-| `popitem()` | Removes the last inserted item |
-| `clear()` | Removes all elements |
-| `copy()` | Returns a shallow copy |
-
-## Iterating Through a Dictionary
-
-### Loop Through Keys:
-
-```python
-for key in person:
- print(key)
-```
-
-### Loop Through Values:
-
-```python
-for value in person.values():
- print(value)
-```
-
-### Loop Through Key-Value Pairs:
-
-```python
-for key, value in person.items():
- print(key, value)
-```
-
-## Nested Dictionaries
-
-A dictionary can contain other dictionaries as values, enabling hierarchical data storage.
-
-```python
-students = {
- "101": {"name": "John", "grade": "A"},
- "102": {"name": "Emma", "grade": "B"},
-}
-students["101"]["name"] # Output: John
-```
-
-## Dictionary Comprehension
-
-Like list comprehensions, dictionary comprehensions offer a concise way to create dictionaries.
-
-```python
-squares = {x: x*x for x in range(1, 6)}
-```
-
-## Use Cases of Dictionaries
-
-* Representing JSON or structured data
-* Frequency counting (e.g., word count)
-* Lookup tables
-* Configuration or settings
-* Storing database records in memory
-
-## Dictionary vs List
-
-| Feature | Dictionary | List |
-| ---------- | ------------------------ | ----------------- |
-| Structure | Key-value pairs | Indexed elements |
-| Access | Via key | Via index |
-| Order | Insertion ordered (3.7+) | Ordered |
-| Mutability | Mutable | Mutable |
-| Use Case | Lookup, mapping | Sequence of items |
-
-## Best Practices
-
-* Use `.get()` instead of direct key access to avoid `KeyError`.
-* Use dictionary comprehension for cleaner and more readable code.
-* Use keys that are hashable (e.g., strings, numbers).
-* Use dictionaries for fast lookups and structured data representation.
-
-## Summary
-
-* Dictionaries are one of the most versatile data structures in Python.
-* They store key-value pairs and allow fast retrieval based on keys.
-* Keys must be unique and immutable.
-* Dictionaries support powerful methods for data manipulation and traversal.
diff --git a/docs/python/python-errors-and-exceptions.md b/docs/python/python-errors-and-exceptions.md
deleted file mode 100644
index 7e9bfbfa..00000000
--- a/docs/python/python-errors-and-exceptions.md
+++ /dev/null
@@ -1,789 +0,0 @@
----
-id: python-errors-and-exceptions
-title: Exception Handling in Python
-sidebar_label: Exception Handling
-sidebar_position: 12
-tags:
- [
- Python,
- Exceptions,
- Error Handling,
- try,
- except,
- finally,
- else,
- raise,
- Python Syntax,
- Introduction of python,
- ]
----
-
-# Exception Handling in Python
-
-**Exception handling** in Python is a mechanism to gracefully manage errors that occur during program execution. Instead of letting your program crash, you can catch and handle errors, provide meaningful feedback, and ensure proper cleanup of resources.
-
-Exceptions are objects that represent errors, and Python provides a robust system to catch, handle, and raise them.
-
----
-
-## Why Exception Handling?
-
-Without exception handling, errors cause programs to crash:
-
-```python
-# This will crash the program
-number = int("abc") # ValueError: invalid literal for int()
-```
-
-With exception handling, you can manage errors gracefully:
-
-```python
-try:
- number = int("abc")
-except ValueError:
- print("Invalid input! Please enter a number.")
- number = 0
-```
-
----
-
-## The `try...except` Block
-
-The basic syntax for handling exceptions:
-
-```python
-try:
- # Code that might raise an exception
- result = 10 / 0
-except ZeroDivisionError:
- # Code to handle the exception
- print("Cannot divide by zero!")
-
-# Output: Cannot divide by zero!
-```
-
-**Syntax:**
-
-```python
-try:
- # Risky code
- pass
-except ExceptionType:
- # Handle the exception
- pass
-```
-
----
-
-## Catching Specific Exceptions
-
-### Single Exception
-
-Catch a specific exception type:
-
-```python
-try:
- age = int(input("Enter your age: "))
- print(f"You are {age} years old")
-except ValueError:
- print("Please enter a valid number!")
-```
-
-### Common Built-in Exceptions
-
-```python
-# ValueError - Invalid value
-try:
- number = int("hello")
-except ValueError:
- print("That's not a valid number!")
-
-# ZeroDivisionError - Division by zero
-try:
- result = 100 / 0
-except ZeroDivisionError:
- print("Cannot divide by zero!")
-
-# FileNotFoundError - File doesn't exist
-try:
- with open("nonexistent.txt", "r") as file:
- content = file.read()
-except FileNotFoundError:
- print("File not found!")
-
-# IndexError - Invalid index
-try:
- my_list = [1, 2, 3]
- print(my_list[10])
-except IndexError:
- print("Index out of range!")
-
-# KeyError - Invalid dictionary key
-try:
- my_dict = {"name": "Alice"}
- print(my_dict["age"])
-except KeyError:
- print("Key not found in dictionary!")
-
-# TypeError - Wrong type operation
-try:
- result = "hello" + 5
-except TypeError:
- print("Cannot add string and integer!")
-```
-
----
-
-## Multiple Exception Handlers
-
-Handle different exceptions separately:
-
-```python
-def divide_numbers(a, b):
- try:
- result = int(a) / int(b)
- return result
- except ValueError:
- print("Error: Please provide valid numbers")
- except ZeroDivisionError:
- print("Error: Cannot divide by zero")
- except Exception as e:
- print(f"Unexpected error: {e}")
-
-divide_numbers("10", "2") # Output: 5.0
-divide_numbers("abc", "2") # Output: Error: Please provide valid numbers
-divide_numbers("10", "0") # Output: Error: Cannot divide by zero
-```
-
-### Catching Multiple Exceptions Together
-
-Use a tuple to catch multiple exceptions with the same handler:
-
-```python
-try:
- value = int(input("Enter a number: "))
- result = 100 / value
-except (ValueError, ZeroDivisionError):
- print("Invalid input or division by zero!")
-
-# With exception details
-try:
- value = int(input("Enter a number: "))
- result = 100 / value
-except (ValueError, ZeroDivisionError) as e:
- print(f"Error occurred: {e}")
-```
-
----
-
-## The `else` Clause
-
-The `else` block executes **only if no exception occurs** in the `try` block:
-
-```python
-try:
- number = int(input("Enter a number: "))
-except ValueError:
- print("Invalid input!")
-else:
- print(f"Success! You entered: {number}")
- print("No errors occurred")
-```
-
-### Practical Example with `else`
-
-```python
-def read_file(filename):
- try:
- file = open(filename, "r")
- except FileNotFoundError:
- print(f"Error: {filename} not found")
- else:
- content = file.read()
- print(f"File content:\n{content}")
- file.close()
- print("File read successfully!")
-
-read_file("example.txt")
-```
-
----
-
-## The `finally` Clause
-
-The `finally` block **always executes**, whether an exception occurs or not. It's used for cleanup actions:
-
-```python
-try:
- file = open("data.txt", "r")
- content = file.read()
- print(content)
-except FileNotFoundError:
- print("File not found!")
-finally:
- print("Cleanup: Closing resources")
- # This always runs
-```
-
-### Resource Cleanup Example
-
-```python
-def process_file(filename):
- file = None
- try:
- file = open(filename, "r")
- data = file.read()
- result = int(data) # Might raise ValueError
- return result
- except FileNotFoundError:
- print("File not found!")
- return None
- except ValueError:
- print("File contains invalid data!")
- return None
- finally:
- if file:
- file.close()
- print("File closed")
-
-process_file("numbers.txt")
-```
-
----
-
-## Complete `try...except...else...finally` Structure
-
-All clauses together:
-
-```python
-def divide_and_log(a, b):
- try:
- result = a / b
- except ZeroDivisionError:
- print("Error: Division by zero")
- return None
- except TypeError:
- print("Error: Invalid types for division")
- return None
- else:
- print(f"Division successful: {a} / {b} = {result}")
- return result
- finally:
- print("Operation completed")
-
-print(divide_and_log(10, 2))
-# Output:
-# Division successful: 10 / 2 = 5.0
-# Operation completed
-# 5.0
-
-print(divide_and_log(10, 0))
-# Output:
-# Error: Division by zero
-# Operation completed
-# None
-```
-
----
-
-## Accessing Exception Information
-
-Use the `as` keyword to access exception details:
-
-```python
-try:
- number = int("abc")
-except ValueError as e:
- print(f"Exception type: {type(e).__name__}")
- print(f"Exception message: {e}")
- print(f"Exception args: {e.args}")
-
-# Output:
-# Exception type: ValueError
-# Exception message: invalid literal for int() with base 10: 'abc'
-# Exception args: ("invalid literal for int() with base 10: 'abc'",)
-```
-
----
-
-## Raising Exceptions
-
-Use the `raise` keyword to throw exceptions:
-
-### Basic Raise
-
-```python
-def check_age(age):
- if age < 0:
- raise ValueError("Age cannot be negative!")
- if age < 18:
- raise ValueError("Must be 18 or older")
- print(f"Age {age} is valid")
-
-try:
- check_age(-5)
-except ValueError as e:
- print(f"Error: {e}")
-# Output: Error: Age cannot be negative!
-```
-
-### Re-raising Exceptions
-
-```python
-def process_data(data):
- try:
- result = int(data)
- return result
- except ValueError as e:
- print("Logging error...")
- raise # Re-raise the same exception
-
-try:
- process_data("invalid")
-except ValueError:
- print("Caught re-raised exception")
-
-# Output:
-# Logging error...
-# Caught re-raised exception
-```
-
-### Raising with Custom Messages
-
-```python
-def withdraw(balance, amount):
- if amount > balance:
- raise ValueError(f"Insufficient funds! Balance: {balance}, Requested: {amount}")
- return balance - amount
-
-try:
- new_balance = withdraw(100, 150)
-except ValueError as e:
- print(e)
-# Output: Insufficient funds! Balance: 100, Requested: 150
-```
-
----
-
-## Custom Exceptions
-
-Create your own exception classes:
-
-```python
-class InvalidEmailError(Exception):
- """Custom exception for invalid email addresses"""
- pass
-
-class AgeRestrictionError(Exception):
- """Custom exception for age restrictions"""
- def __init__(self, age, minimum_age):
- self.age = age
- self.minimum_age = minimum_age
- super().__init__(f"Age {age} is below minimum required age {minimum_age}")
-
-# Using custom exceptions
-def validate_email(email):
- if "@" not in email:
- raise InvalidEmailError(f"Invalid email format: {email}")
- print("Email is valid!")
-
-def check_eligibility(age):
- minimum_age = 18
- if age < minimum_age:
- raise AgeRestrictionError(age, minimum_age)
- print("Eligible!")
-
-# Test custom exceptions
-try:
- validate_email("invalidemail.com")
-except InvalidEmailError as e:
- print(f"Error: {e}")
-# Output: Error: Invalid email format: invalidemail.com
-
-try:
- check_eligibility(15)
-except AgeRestrictionError as e:
- print(f"Error: {e}")
- print(f"You are {e.minimum_age - e.age} years too young")
-# Output:
-# Error: Age 15 is below minimum required age 18
-# You are 3 years too young
-```
-
----
-
-## Exception Hierarchy
-
-Python exceptions follow a hierarchy. Catching a parent exception catches all child exceptions:
-
-```python
-try:
- # Some code
- pass
-except Exception as e:
- # Catches most exceptions (but not KeyboardInterrupt, SystemExit)
- print(f"Caught: {e}")
-```
-
-**Common Exception Hierarchy:**
-```
-BaseException
-├── SystemExit
-├── KeyboardInterrupt
-├── Exception
- ├── ArithmeticError
- │ ├── ZeroDivisionError
- │ ├── FloatingPointError
- │ └── OverflowError
- ├── LookupError
- │ ├── IndexError
- │ └── KeyError
- ├── ValueError
- ├── TypeError
- ├── NameError
- └── ... (many more)
-```
-
-### Catching Parent Exceptions
-
-```python
-try:
- my_list = [1, 2, 3]
- print(my_list[10]) # IndexError
-except LookupError as e: # Parent of IndexError
- print(f"Lookup error occurred: {e}")
-# Output: Lookup error occurred: list index out of range
-```
-
----
-
-## Practical Examples
-
-### Example 1: Safe User Input
-
-```python
-def get_integer_input(prompt):
- """Safely get integer input from user."""
- while True:
- try:
- value = int(input(prompt))
- return value
- except ValueError:
- print("Invalid input! Please enter a whole number.")
- except KeyboardInterrupt:
- print("\nInput cancelled by user")
- return None
-
-age = get_integer_input("Enter your age: ")
-if age:
- print(f"You are {age} years old")
-```
-
-### Example 2: File Processing with Error Handling
-
-```python
-def process_data_file(filename):
- """Process a data file with comprehensive error handling."""
- try:
- with open(filename, "r") as file:
- lines = file.readlines()
-
- numbers = []
- for line_num, line in enumerate(lines, 1):
- try:
- number = float(line.strip())
- numbers.append(number)
- except ValueError:
- print(f"Warning: Invalid number on line {line_num}: '{line.strip()}'")
- continue
-
- if not numbers:
- raise ValueError("No valid numbers found in file")
-
- average = sum(numbers) / len(numbers)
- return average
-
- except FileNotFoundError:
- print(f"Error: File '{filename}' not found")
- return None
- except PermissionError:
- print(f"Error: No permission to read '{filename}'")
- return None
- except ValueError as e:
- print(f"Error: {e}")
- return None
- else:
- print(f"Successfully processed {len(numbers)} numbers")
- finally:
- print("File processing completed")
-
-result = process_data_file("data.txt")
-if result:
- print(f"Average: {result:.2f}")
-```
-
-### Example 3: API Request Handler
-
-```python
-class APIError(Exception):
- """Custom exception for API errors"""
- pass
-
-class AuthenticationError(APIError):
- """Custom exception for authentication failures"""
- pass
-
-def make_api_request(endpoint, auth_token=None):
- """Simulate an API request with error handling."""
- try:
- if not auth_token:
- raise AuthenticationError("No authentication token provided")
-
- if not endpoint.startswith("/api/"):
- raise ValueError(f"Invalid endpoint format: {endpoint}")
-
- # Simulate API call
- if endpoint == "/api/users":
- return {"status": "success", "data": ["user1", "user2"]}
- else:
- raise APIError(f"Endpoint not found: {endpoint}")
-
- except AuthenticationError as e:
- print(f"Authentication failed: {e}")
- return {"status": "error", "message": str(e)}
- except APIError as e:
- print(f"API error: {e}")
- return {"status": "error", "message": str(e)}
- except ValueError as e:
- print(f"Validation error: {e}")
- return {"status": "error", "message": str(e)}
- except Exception as e:
- print(f"Unexpected error: {e}")
- return {"status": "error", "message": "Internal server error"}
- finally:
- print(f"Request to {endpoint} completed")
-
-# Test the API handler
-response = make_api_request("/api/users", "secret_token")
-print(response)
-```
-
-### Example 4: Calculator with Exception Handling
-
-```python
-def safe_calculator(operation, num1, num2):
- """Perform calculations with comprehensive error handling."""
- try:
- # Convert inputs to float
- a = float(num1)
- b = float(num2)
-
- if operation == "+":
- result = a + b
- elif operation == "-":
- result = a - b
- elif operation == "*":
- result = a * b
- elif operation == "/":
- if b == 0:
- raise ZeroDivisionError("Cannot divide by zero")
- result = a / b
- elif operation == "**":
- if a == 0 and b < 0:
- raise ValueError("Cannot raise 0 to a negative power")
- result = a ** b
- else:
- raise ValueError(f"Unknown operation: {operation}")
-
- except ValueError as e:
- return f"Error: {e}"
- except ZeroDivisionError as e:
- return f"Error: {e}"
- except OverflowError:
- return "Error: Result is too large to calculate"
- except Exception as e:
- return f"Unexpected error: {e}"
- else:
- return f"{num1} {operation} {num2} = {result}"
- finally:
- print("Calculation attempt completed")
-
-# Test cases
-print(safe_calculator("+", "10", "5")) # 10 + 5 = 15.0
-print(safe_calculator("/", "10", "0")) # Error: Cannot divide by zero
-print(safe_calculator("^", "10", "5")) # Error: Unknown operation: ^
-print(safe_calculator("**", "2", "1000")) # Error: Result is too large
-```
-
----
-
-## Best Practices
-
-### 1. Be Specific with Exceptions
-
-```python
-# Good - Catch specific exceptions
-try:
- value = int(input("Enter number: "))
-except ValueError:
- print("Invalid number")
-
-# Avoid - Too broad
-try:
- value = int(input("Enter number: "))
-except Exception:
- print("Something went wrong")
-```
-
-### 2. Don't Silence Exceptions
-
-```python
-# Bad - Silences all errors
-try:
- risky_operation()
-except:
- pass
-
-# Good - Handle specifically or log
-try:
- risky_operation()
-except SpecificError as e:
- logger.error(f"Operation failed: {e}")
- # Take appropriate action
-```
-
-### 3. Use `finally` for Cleanup
-
-```python
-# Good - Ensures cleanup happens
-file = None
-try:
- file = open("data.txt", "r")
- process(file)
-except Exception as e:
- print(f"Error: {e}")
-finally:
- if file:
- file.close()
-
-# Better - Use context managers
-try:
- with open("data.txt", "r") as file:
- process(file)
-except Exception as e:
- print(f"Error: {e}")
-```
-
-### 4. Provide Helpful Error Messages
-
-```python
-# Good
-def set_age(age):
- if age < 0:
- raise ValueError(f"Age cannot be negative. Received: {age}")
- if age > 150:
- raise ValueError(f"Age seems invalid. Received: {age}")
-
-# Less helpful
-def set_age(age):
- if age < 0 or age > 150:
- raise ValueError("Invalid age")
-```
-
-### 5. Don't Use Exceptions for Flow Control
-
-```python
-# Bad - Using exceptions for normal flow
-try:
- return my_dict[key]
-except KeyError:
- return default_value
-
-# Good - Use proper checks
-return my_dict.get(key, default_value)
-```
-
----
-
-## Common Patterns
-
-### Pattern 1: Retry Logic
-
-```python
-def retry_operation(func, max_attempts=3):
- """Retry an operation multiple times on failure."""
- for attempt in range(1, max_attempts + 1):
- try:
- result = func()
- return result
- except Exception as e:
- print(f"Attempt {attempt} failed: {e}")
- if attempt == max_attempts:
- print("All attempts failed")
- raise
- print("Retrying...")
-
-# Usage
-def unreliable_operation():
- import random
- if random.random() < 0.7:
- raise ConnectionError("Network error")
- return "Success!"
-
-try:
- result = retry_operation(unreliable_operation)
- print(result)
-except ConnectionError:
- print("Operation failed after all retries")
-```
-
-### Pattern 2: Context Manager with Exception Handling
-
-```python
-class DatabaseConnection:
- """Custom context manager with exception handling."""
-
- def __init__(self, db_name):
- self.db_name = db_name
- self.connection = None
-
- def __enter__(self):
- print(f"Opening connection to {self.db_name}")
- self.connection = f"Connected to {self.db_name}"
- return self
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- print(f"Closing connection to {self.db_name}")
- if exc_type is not None:
- print(f"Exception occurred: {exc_type.__name__}: {exc_val}")
- # Return False to propagate the exception
- return False
- return True
-
-# Usage
-try:
- with DatabaseConnection("users_db") as db:
- print("Performing database operations...")
- # Simulate an error
- raise ValueError("Invalid query")
-except ValueError as e:
- print(f"Caught: {e}")
-```
-
----
-
-## Summary
-
-| Concept | Purpose | Example |
-| --------------- | ------------------------------------ | ------------------------------------------ |
-| `try` | Code that might raise exceptions | `try: risky_code()` |
-| `except` | Handle specific exceptions | `except ValueError: handle_error()` |
-| `else` | Runs if no exception occurred | `else: print("Success!")` |
-| `finally` | Always runs (cleanup) | `finally: cleanup()` |
-| `raise` | Throw an exception | `raise ValueError("Invalid")` |
-| `as` | Capture exception details | `except ValueError as e:` |
-| Custom | Create custom exception classes | `class MyError(Exception): pass` |
-| Multiple except | Handle different exceptions | `except (ValueError, TypeError):` |
-| Exception chain | Parent exception catches children | `except LookupError:` (catches IndexError) |
-
-Exception handling is essential for writing robust Python programs. It allows you to gracefully manage errors, provide meaningful feedback to users, and ensure proper resource cleanup. Master these concepts to build reliable and maintainable applications!
\ No newline at end of file
diff --git a/docs/python/python-functions.md b/docs/python/python-functions.md
deleted file mode 100644
index a15ccd8b..00000000
--- a/docs/python/python-functions.md
+++ /dev/null
@@ -1,464 +0,0 @@
----
-id: python-functions
-title: Functions in Python
-sidebar_label: Functions in Python
-sidebar_position: 11
-tags:
- [
- Python,
- Functions,
- def,
- return,
- arguments,
- parameters,
- args,
- kwargs,
- Python Syntax,
- Introduction of python,
- ]
----
-
-# Functions in Python
-
-A **function** in Python is a block of reusable code that performs a specific task. Functions help organize code, avoid repetition, and make programs more modular and maintainable.
-
-Functions are defined using the `def` keyword and can accept inputs (parameters) and return outputs.
-
----
-
-## Defining a Function
-
-Use the `def` keyword followed by the function name and parentheses:
-
-```python
-def greet():
- print("Hello, World!")
-
-# Call the function
-greet() # Output: Hello, World!
-```
-
-**Syntax:**
-
-```python
-def function_name(parameters):
- """Optional docstring"""
- # Function body
- return value # Optional
-```
-
----
-
-## Function with Parameters
-
-Functions can accept inputs called **parameters** or **arguments**:
-
-```python
-def greet_person(name):
- print(f"Hello, {name}!")
-
-greet_person("Alice") # Output: Hello, Alice!
-greet_person("Bob") # Output: Hello, Bob!
-```
-
-### Multiple Parameters
-
-```python
-def add_numbers(a, b):
- result = a + b
- print(f"{a} + {b} = {result}")
-
-add_numbers(5, 3) # Output: 5 + 3 = 8
-```
-
----
-
-## The `return` Statement
-
-Functions can return values using the `return` keyword:
-
-```python
-def multiply(x, y):
- return x * y
-
-result = multiply(4, 5)
-print(result) # Output: 20
-```
-
-### Multiple Return Values
-
-Python functions can return multiple values as a tuple:
-
-```python
-def get_name_age():
- name = "John"
- age = 25
- return name, age
-
-person_name, person_age = get_name_age()
-print(f"Name: {person_name}, Age: {person_age}")
-# Output: Name: John, Age: 25
-```
-
-### Functions Without Return
-
-If no `return` statement is used, the function returns `None`:
-
-```python
-def say_hello():
- print("Hello!")
-
-result = say_hello() # Output: Hello!
-print(result) # Output: None
-```
-
----
-
-## Default Arguments
-
-You can provide default values for parameters:
-
-```python
-def greet_with_title(name, title="Mr."):
- print(f"Hello, {title} {name}!")
-
-greet_with_title("Smith") # Output: Hello, Mr. Smith!
-greet_with_title("Johnson", "Dr.") # Output: Hello, Dr. Johnson!
-```
-
-### Multiple Default Arguments
-
-```python
-def create_profile(name, age=18, country="USA"):
- print(f"Name: {name}, Age: {age}, Country: {country}")
-
-create_profile("Alice") # Name: Alice, Age: 18, Country: USA
-create_profile("Bob", 25) # Name: Bob, Age: 25, Country: USA
-create_profile("Charlie", 30, "Canada") # Name: Charlie, Age: 30, Country: Canada
-```
-
----
-
-## Keyword Arguments
-
-You can pass arguments by specifying the parameter name:
-
-```python
-def book_info(title, author, year):
- print(f"'{title}' by {author} ({year})")
-
-# Positional arguments
-book_info("1984", "George Orwell", 1949)
-
-# Keyword arguments
-book_info(author="Jane Austen", title="Pride and Prejudice", year=1813)
-
-# Mixed (positional first, then keyword)
-book_info("Hamlet", author="Shakespeare", year=1600)
-```
-
----
-
-## Variable-Length Arguments: `*args`
-
-Use `*args` to accept any number of positional arguments:
-
-```python
-def sum_all(*numbers):
- total = 0
- for num in numbers:
- total += num
- return total
-
-print(sum_all(1, 2, 3)) # Output: 6
-print(sum_all(1, 2, 3, 4, 5)) # Output: 15
-print(sum_all(10)) # Output: 10
-```
-
-### Combining Regular Parameters with \*args
-
-```python
-def introduce(name, *hobbies):
- print(f"Hi, I'm {name}!")
- if hobbies:
- print("My hobbies are:", ", ".join(hobbies))
-
-introduce("Alice") # Hi, I'm Alice!
-introduce("Bob", "reading", "swimming") # Hi, I'm Bob!
- # My hobbies are: reading, swimming
-```
-
----
-
-## Variable-Length Keyword Arguments: `**kwargs`
-
-Use `**kwargs` to accept any number of keyword arguments:
-
-```python
-def display_info(**info):
- for key, value in info.items():
- print(f"{key}: {value}")
-
-display_info(name="John", age=25, city="New York")
-# Output:
-# name: John
-# age: 25
-# city: New York
-```
-
-### Combining \*args and \*\*kwargs
-
-```python
-def flexible_function(*args, **kwargs):
- print("Positional arguments:", args)
- print("Keyword arguments:", kwargs)
-
-flexible_function(1, 2, 3, name="Alice", age=30)
-# Output:
-# Positional arguments: (1, 2, 3)
-# Keyword arguments: {'name': 'Alice', 'age': 30}
-```
-
----
-
-## Function Parameter Order
-
-When combining different types of parameters, follow this order:
-
-```python
-def complete_function(required, default="value", *args, **kwargs):
- print(f"Required: {required}")
- print(f"Default: {default}")
- print(f"Args: {args}")
- print(f"Kwargs: {kwargs}")
-
-complete_function("must_have", "custom", 1, 2, 3, extra="info")
-# Output:
-# Required: must_have
-# Default: custom
-# Args: (1, 2, 3)
-# Kwargs: {'extra': 'info'}
-```
-
----
-
-## Scope and Local vs Global Variables
-
-### Local Scope
-
-Variables defined inside a function are **local**:
-
-```python
-def my_function():
- local_var = "I'm local"
- print(local_var)
-
-my_function() # Output: I'm local
-# print(local_var) # Error: local_var is not defined
-```
-
-### Global Scope
-
-Variables defined outside functions are **global**:
-
-```python
-global_var = "I'm global"
-
-def access_global():
- print(global_var) # Can read global variable
-
-access_global() # Output: I'm global
-```
-
-### Modifying Global Variables
-
-Use the `global` keyword to modify global variables inside functions:
-
-```python
-counter = 0
-
-def increment():
- global counter
- counter += 1
-
-increment()
-print(counter) # Output: 1
-```
-
----
-
-## Docstrings
-
-Document your functions using docstrings:
-
-```python
-def calculate_area(length, width):
- """
- Calculate the area of a rectangle.
-
- Args:
- length (float): The length of the rectangle
- width (float): The width of the rectangle
-
- Returns:
- float: The area of the rectangle
- """
- return length * width
-
-# Access docstring
-print(calculate_area.__doc__)
-```
-
----
-
-## Lambda Functions
-
-**Lambda functions** are small, anonymous functions defined using the `lambda` keyword:
-
-```python
-# Regular function
-def square(x):
- return x ** 2
-
-# Lambda equivalent
-square_lambda = lambda x: x ** 2
-
-print(square(5)) # Output: 25
-print(square_lambda(5)) # Output: 25
-```
-
-### Lambda with Multiple Arguments
-
-```python
-# Lambda with multiple arguments
-add = lambda x, y: x + y
-print(add(3, 7)) # Output: 10
-
-# Lambda with default arguments
-greet = lambda name="World": f"Hello, {name}!"
-print(greet()) # Output: Hello, World!
-print(greet("Alice")) # Output: Hello, Alice!
-```
-
----
-
-## Practical Examples
-
-### Example 1: Temperature Converter
-
-```python
-def celsius_to_fahrenheit(celsius, precision=2):
- """Convert Celsius to Fahrenheit with specified precision."""
- fahrenheit = (celsius * 9/5) + 32
- return round(fahrenheit, precision)
-
-print(celsius_to_fahrenheit(25)) # Output: 77.0
-print(celsius_to_fahrenheit(0, 1)) # Output: 32.0
-```
-
-### Example 2: Shopping Cart Calculator
-
-```python
-def calculate_total(*prices, tax_rate=0.08, discount=0):
- """Calculate total price with tax and discount."""
- subtotal = sum(prices)
- discounted = subtotal - (subtotal * discount)
- total = discounted + (discounted * tax_rate)
- return round(total, 2)
-
-# Usage examples
-print(calculate_total(10.99, 25.50, 8.75))
-# Output: 48.87
-
-print(calculate_total(10.99, 25.50, tax_rate=0.10, discount=0.15))
-# Output: 34.19
-```
-
-### Example 3: User Registration System
-
-```python
-def register_user(username, email, **additional_info):
- """Register a new user with optional additional information."""
- user = {
- "username": username,
- "email": email,
- "status": "active"
- }
-
- # Add any additional information
- user.update(additional_info)
-
- print(f"User {username} registered successfully!")
- return user
-
-# Usage
-new_user = register_user(
- "alice_dev",
- "alice@example.com",
- age=28,
- location="New York",
- skills=["Python", "JavaScript"]
-)
-
-print(new_user)
-```
-
----
-
-## Best Practices
-
-### 1. Use Descriptive Names
-
-```python
-# Good
-def calculate_monthly_payment(principal, rate, months):
- return (principal * rate) / (1 - (1 + rate) ** -months)
-
-# Avoid
-def calc(p, r, m):
- return (p * r) / (1 - (1 + r) ** -m)
-```
-
-### 2. Keep Functions Small and Focused
-
-```python
-# Good - Single responsibility
-def validate_email(email):
- return "@" in email and "." in email
-
-def send_welcome_email(email):
- if validate_email(email):
- print(f"Welcome email sent to {email}")
-
-# Better than one large function doing everything
-```
-
-### 3. Use Type Hints (Python 3.5+)
-
-```python
-def add_numbers(a: int, b: int) -> int:
- """Add two integers and return the result."""
- return a + b
-
-def greet_user(name: str, times: int = 1) -> None:
- """Greet a user a specified number of times."""
- for _ in range(times):
- print(f"Hello, {name}!")
-```
-
----
-
-## Summary
-
-| Concept | Description | Example |
-| ------------ | ----------------------------- | ---------------------------- |
-| `def` | Define a function | `def my_func():` |
-| `return` | Return a value | `return result` |
-| Parameters | Function inputs | `def func(a, b):` |
-| Default args | Parameters with defaults | `def func(a, b=10):` |
-| `*args` | Variable positional arguments | `def func(*args):` |
-| `**kwargs` | Variable keyword arguments | `def func(**kwargs):` |
-| Lambda | Anonymous function | `lambda x: x * 2` |
-| Docstring | Function documentation | `"""Function description"""` |
-
-Functions are fundamental building blocks in Python that make code reusable, organized, and maintainable. Master these concepts to write clean and efficient Python programs!
diff --git a/docs/python/python-io.md b/docs/python/python-io.md
deleted file mode 100644
index 58a58c74..00000000
--- a/docs/python/python-io.md
+++ /dev/null
@@ -1,152 +0,0 @@
----
-id: python-io
-title: File Input and Output (I/O) in Python
-description: Learn how to read from and write to files using Python's built-in I/O functions.
-sidebar_label: File I/O in Python
-sidebar_position: 13
-tags:
- [
- Python,
- List in Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String,
- Tuple in Python
- Array in Python
- Functions in Python
- Recursion in Python
- Opps in Python
- ]
----
-
-# File Input and Output (I/O) in Python
-
-In Python, file I/O is used to read from or write to files. This is an essential part of any programming language when it comes to data processing, logging, or configuration.
-
-
-## Opening Files
-
-To work with files in Python, you use the built-in `open()` function.
-
-```python
-file = open("example.txt", "r") # Open for reading
-````
-
-### Modes:
-
-| Mode | Description |
-| ----- | ---------------------------------------------------- |
-| `'r'` | Read (default). Fails if the file doesn’t exist. |
-| `'w'` | Write. Creates a new file or truncates existing one. |
-| `'a'` | Append. Adds content to the end of the file. |
-| `'b'` | Binary mode. Used with `'rb'`, `'wb'`, etc. |
-| `'x'` | Create. Fails if the file already exists. |
-
-
-## Reading from a File
-
-### `read()` – Reads entire content
-
-````python
-with open("example.txt", "r") as file:
- content = file.read()
- print(content)
-````
-
-### `readline()` – Reads one line at a time
-
-````python
-with open("example.txt", "r") as file:
- line = file.readline()
- print(line)
-````
-
-### `readlines()` – Reads all lines into a list
-
-````python
-with open("example.txt", "r") as file:
- lines = file.readlines()
- print(lines)
-````
-
-## Writing to a File
-
-### `write()` – Write string to file
-
-````python
-with open("output.txt", "w") as file:
- file.write("Hello, world!")
-````
-
-### `writelines()` – Write list of strings
-
-````python
-lines = ["Line 1\n", "Line 2\n"]
-with open("output.txt", "w") as file:
- file.writelines(lines)
-````
-
-
-## Using `with` Statement (Best Practice)
-
-The `with` block ensures the file is automatically closed after use:
-
-````python
-with open("data.txt", "r") as file:
- data = file.read()
-````
-
-This is the **recommended way** to handle files in Python.
-
-
-## Error Handling in File I/O
-
-Always handle file operations with care to avoid exceptions:
-
-````python
-try:
- with open("config.txt", "r") as file:
- config = file.read()
-except FileNotFoundError:
- print("File not found.")
-except IOError:
- print("Error while handling the file.")
-````
-
-
-## File Paths
-
-You can also handle file paths using the `os` or `pathlib` module:
-
-````python
-from pathlib import Path
-
-file_path = Path("docs") / "myfile.txt"
-with open(file_path, "r") as file:
- print(file.read())
-````
-
-
-## Example: Reading & Writing
-
-````python
-# Write to a file
-with open("sample.txt", "w") as file:
- file.write("This is a test.")
-
-# Read the file
-with open("sample.txt", "r") as file:
- print(file.read())
-````
-
-
-## Summary
-
-* Use `open()` to access files.
-* Use `read()`, `readline()`, or `readlines()` to read.
-* Use `write()` or `writelines()` to write.
-* Always use `with` to handle files safely.
-* Handle exceptions for robustness.
\ No newline at end of file
diff --git a/docs/python/python-list.md b/docs/python/python-list.md
deleted file mode 100644
index d7f4af64..00000000
--- a/docs/python/python-list.md
+++ /dev/null
@@ -1,260 +0,0 @@
----
-id: python-list
-title: List in Python
-sidebar_label: List in Python #displays in sidebar
-sidebar_position: 8
-tags:
- [
- Python,
- List in Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String
- ]
-
----
-
-
-# Lists in Python
-
-A **List** in Python is a data structure that allows you to store multiple items in a single variable. Lists are **ordered**, **mutable**, and **can contain elements of different data types**.
-
-
-## Creating a List
-
-You create a list using square brackets `[]`:
-
-```python
-# Empty List
-empty_list = []
-
-# List of Integers
-numbers = [1, 2, 3, 4, 5]
-
-# List of Strings
-fruits = ["apple", "banana", "cherry"]
-
-# Mixed Data Types
-mixed = [1, "hello", 3.14, True]
-````
-
-
-
-## Indexing
-
-**Indexing** means accessing elements by their position.
-
-* Index starts from **0** in Python:
-
-```python
-fruits = ["apple", "banana", "cherry"]
-
-print(fruits[0]) # apple
-print(fruits[1]) # banana
-print(fruits[2]) # cherry
-```
-
-* Negative indexing starts from the end:
-
-```python
-print(fruits[-1]) # cherry
-print(fruits[-2]) # banana
-print(fruits[-3]) # apple
-```
-
-
-
-## Slicing
-
-**Slicing** lets you extract a sublist:
-
-```python
-numbers = [10, 20, 30, 40, 50]
-
-print(numbers[1:4]) # [20, 30, 40]
-print(numbers[:3]) # [10, 20, 30]
-print(numbers[2:]) # [30, 40, 50]
-print(numbers[-3:-1]) # [30, 40]
-```
-
-**Syntax:**
-
-```
-list[start:stop:step]
-```
-
-**Example with step:**
-
-```python
-print(numbers[::2]) # [10, 30, 50]
-```
-
-
-## Modifying Elements
-
-Lists are **mutable**, which means you can change their contents:
-
-```python
-fruits = ["apple", "banana", "cherry"]
-fruits[1] = "mango"
-print(fruits) # ['apple', 'mango', 'cherry']
-```
-
-
-## List Methods
-
-Python provides many built-in methods for lists:
-
-| Method | Description |
-| -------------- | ----------------------------------------------------- |
-| `append(x)` | Adds an item to the end of the list |
-| `insert(i, x)` | Inserts an item at a specific index |
-| `extend(iter)` | Adds all elements from another iterable |
-| `remove(x)` | Removes the first occurrence of the item |
-| `pop([i])` | Removes and returns the item at the given index |
-| `clear()` | Removes all elements |
-| `index(x)` | Returns the index of the first occurrence of the item |
-| `count(x)` | Counts how many times the item appears |
-| `sort()` | Sorts the list in ascending order |
-| `reverse()` | Reverses the list |
-| `copy()` | Returns a shallow copy of the list |
-
----
-
-### Examples
-
-#### append()
-
-```python
-nums = [1, 2, 3]
-nums.append(4)
-print(nums) # [1, 2, 3, 4]
-```
-
-#### insert()
-
-```python
-nums.insert(1, 100)
-print(nums) # [1, 100, 2, 3, 4]
-```
-
-#### extend()
-
-```python
-nums.extend([5, 6])
-print(nums) # [1, 100, 2, 3, 4, 5, 6]
-```
-
-#### remove() and pop()
-
-```python
-nums.remove(100)
-print(nums) # [1, 2, 3, 4, 5, 6]
-
-nums.pop() # Removes the last element
-print(nums) # [1, 2, 3, 4, 5]
-
-nums.pop(2) # Removes index 2
-print(nums) # [1, 2, 4, 5]
-```
-
-
-## Iterating Through a List
-
-**Using a for loop:**
-
-```python
-fruits = ["apple", "banana", "cherry"]
-
-for item in fruits:
- print(item)
-```
-
-**Output:**
-
-```
-apple
-banana
-cherry
-```
-
-**Using indices:**
-
-```python
-for i in range(len(fruits)):
- print(i, fruits[i])
-```
-
-
-## Membership Test
-
-Check whether an item exists in the list:
-
-```python
-print("apple" in fruits) # True
-print("mango" not in fruits) # True
-```
-
-
-## Nested Lists
-
-Lists can contain other lists:
-
-```python
-matrix = [
- [1, 2, 3],
- [4, 5, 6],
- [7, 8, 9]
-]
-
-print(matrix[0]) # [1, 2, 3]
-print(matrix[1][2]) # 6
-```
-
-
-## List Comprehensions
-
-A **concise way** to create new lists:
-
-```python
-squares = [x**2 for x in range(1, 6)]
-print(squares) # [1, 4, 9, 16, 25]
-```
-
-**With a condition:**
-
-```python
-even = [x for x in range(10) if x % 2 == 0]
-print(even) # [0, 2, 4, 6, 8]
-```
-
-
-## Copying Lists
-
-Be careful! Assigning directly creates a reference:
-
-```python
-a = [1, 2, 3]
-b = a
-b.append(4)
-
-print(a) # [1, 2, 3, 4]
-```
-
-To create an **independent copy:**
-
-```python
-c = a.copy()
-c.append(5)
-
-print(a) # [1, 2, 3, 4]
-print(c) # [1, 2, 3, 4, 5]
-```
-
-
-## Conclusion
-
-Python Lists are a **powerful and flexible** data structure used everywhere—from collecting and processing data to building complex programs. Practice using list methods and experiment to become confident.
diff --git a/docs/python/python-loops.md b/docs/python/python-loops.md
deleted file mode 100644
index 2d31c08e..00000000
--- a/docs/python/python-loops.md
+++ /dev/null
@@ -1,433 +0,0 @@
----
-id: python-loops
-title: Loops in Python
-sidebar_label: Loops in Python
-sidebar_position: 10
-tags:
- - Python
- - Loops
- - for loop
- - while loop
- - Control Flow
- - Iteration
- - Python Syntax
----
-
-# Loops in Python
-
-Loops in Python allow you to execute a block of code repeatedly. They are essential for automating repetitive tasks and processing collections of data efficiently.
-
-## The `for` Loop
-
-The `for` loop is used to iterate over a sequence (like a list, tuple, string, or range).
-
-**Syntax:**
-
-```python
-for variable in sequence:
- # block of code
-```
-
-**Example:**
-
-```python
-fruits = ["apple", "banana", "cherry"]
-for fruit in fruits:
- print(fruit)
-```
-
-**Output:**
-```
-apple
-banana
-cherry
-```
-
-## The `range()` Function
-
-The `range()` function generates a sequence of numbers, commonly used with `for` loops.
-
-```python
-# Print numbers 0 to 4
-for i in range(5):
- print(i)
-
-# Print numbers 2 to 6
-for i in range(2, 7):
- print(i)
-
-# Print even numbers from 0 to 8
-for i in range(0, 10, 2):
- print(i)
-```
-
-**Output:**
-```
-0
-1
-2
-3
-4
-```
-
-## The `while` Loop
-
-The `while` loop continues executing as long as a condition is **True**.
-
-**Syntax:**
-
-```python
-while condition:
- # block of code
-```
-
-**Example:**
-
-```python
-count = 1
-while count <= 5:
- print(f"Count: {count}")
- count += 1
-```
-
-**Output:**
-```
-Count: 1
-Count: 2
-Count: 3
-Count: 4
-Count: 5
-```
-
-## Loop Control Statements
-
-### The `break` Statement
-
-`break` exits the loop immediately.
-
-```python
-for i in range(10):
- if i == 5:
- break
- print(i)
-```
-
-**Output:**
-```
-0
-1
-2
-3
-4
-```
-
-### The `continue` Statement
-
-`continue` skips the current iteration and moves to the next one.
-
-```python
-for i in range(5):
- if i == 2:
- continue
- print(i)
-```
-
-**Output:**
-```
-0
-1
-3
-4
-```
-
-### The `pass` Statement
-
-`pass` is a placeholder that does nothing. Useful when you need syntactically correct code but no action.
-
-```python
-for i in range(3):
- if i == 1:
- pass # Do nothing for i == 1
- else:
- print(i)
-```
-
-## Nested Loops
-
-You can place one loop inside another loop.
-
-```python
-# Multiplication table
-for i in range(1, 4):
- for j in range(1, 4):
- print(f"{i} x {j} = {i * j}")
- print() # Empty line after each row
-```
-
-**Output:**
-```
-1 x 1 = 1
-1 x 2 = 2
-1 x 3 = 3
-
-2 x 1 = 2
-2 x 2 = 4
-2 x 3 = 6
-
-3 x 1 = 3
-3 x 2 = 6
-3 x 3 = 9
-```
-
-## Looping Through Different Data Types
-
-### Strings
-
-```python
-word = "Python"
-for letter in word:
- print(letter)
-```
-
-### Dictionaries
-
-```python
-student = {"name": "Alice", "age": 20, "grade": "A"}
-
-# Loop through keys
-for key in student:
- print(key)
-
-# Loop through values
-for value in student.values():
- print(value)
-
-# Loop through key-value pairs
-for key, value in student.items():
- print(f"{key}: {value}")
-```
-
-### Lists with Index
-
-```python
-colors = ["red", "green", "blue"]
-
-# Using enumerate() to get index and value
-for index, color in enumerate(colors):
- print(f"{index}: {color}")
-```
-
-**Output:**
-```
-0: red
-1: green
-2: blue
-```
-
-## The `else` Clause in Loops
-
-Loops can have an `else` clause that executes when the loop completes normally (not broken by `break`).
-
-```python
-# With for loop
-for i in range(3):
- print(i)
-else:
- print("Loop completed!")
-
-# With while loop
-count = 0
-while count < 3:
- print(count)
- count += 1
-else:
- print("While loop finished!")
-```
-
-## Common Loop Patterns
-
-### Counting Pattern
-
-```python
-# Count occurrences
-text = "hello world"
-count = 0
-for char in text:
- if char == 'l':
- count += 1
-print(f"Letter 'l' appears {count} times")
-```
-
-### Accumulation Pattern
-
-```python
-# Sum of numbers
-numbers = [1, 2, 3, 4, 5]
-total = 0
-for num in numbers:
- total += num
-print(f"Sum: {total}")
-```
-
-### Finding Pattern
-
-```python
-# Find first even number
-numbers = [1, 3, 5, 8, 9, 10]
-for num in numbers:
- if num % 2 == 0:
- print(f"First even number: {num}")
- break
-```
-
-## Best Practices
-
-1. **Use `for` loops** when you know the number of iterations
-2. **Use `while` loops** when the condition determines when to stop
-3. **Avoid infinite loops** by ensuring the condition eventually becomes `False`
-4. **Use meaningful variable names** in loops
-5. **Consider list comprehensions** for simple transformations
-
-## Summary Table
-
-| Loop Type | Use Case |
-|------------------------|---------------------------------------------|
-| `for` loop | Iterating over sequences (lists, strings) |
-| `while` loop | Repeating until a condition is met |
-| `break` | Exit loop immediately |
-| `continue` | Skip current iteration |
-| `pass` | Placeholder for empty loop body |
-| Nested loops | Working with multi-dimensional data |
-| List comprehensions | Creating lists with concise syntax |
-
-
-
-### **Practice Questions:**
-
-#### **1. Print Even Numbers**
-
-Write a Python program to print all **even numbers from 1 to 20** using a `for` loop.
-
-**Expected Output:**
-
-```
-2 4 6 8 10 12 14 16 18 20
-```
-
----
-
-#### **2. Sum of Natural Numbers**
-
-Write a program to calculate the **sum of the first 10 natural numbers** using a loop.
-
-**Expected Output:**
-
-```
-The sum is: 55
-```
-
----
-
-#### **3. Loop Through a String**
-
-Given the string:
-
-```python
-word = "Python"
-```
-
-Write a loop to print each **character on a new line**.
-
----
-
-#### **4. Reverse a List Using Loop**
-
-Without using the built-in `reverse()` or slicing, write a program to **print a list in reverse order** using a loop.
-
-```python
-numbers = [1, 2, 3, 4, 5]
-```
-
-**Expected Output:**
-
-```
-5
-4
-3
-2
-1
-```
-
----
-
-#### **5. Multiplication Table**
-
-Write a Python program to **print the multiplication table of 7** using a loop.
-
-**Expected Output:**
-
-```
-7 x 1 = 7
-7 x 2 = 14
-...
-7 x 10 = 70
-```
-
----
-
-#### **6. Using `break` Statement**
-
-Write a loop that prints numbers from 1 to 10.
-
-* If the number is **5**, use `break` to stop the loop.
-
-**Expected Output:**
-
-```
-1
-2
-3
-4
-```
-
----
-
-#### **7. Using `continue` Statement**
-
-Write a loop that prints numbers from 1 to 10.
-
-* **Skip** printing the number **5** using `continue`.
-
-**Expected Output:**
-
-```
-1
-2
-3
-4
-6
-7
-8
-9
-10
-```
-
----
-
-#### **8. Nested Loop – Pattern Printing**
-
-Write a program using **nested loops** to print the following pattern:
-
-```
-*
-* *
-* * *
-* * * *
-* * * * *
-```
-
----
-
-## Conclusion
-
-Loops are fundamental to programming in Python. Whether you're processing data, automating tasks, or building complex algorithms, mastering `for` and `while` loops will make your code more efficient and powerful. Practice with different data types and loop patterns to become proficient in using loops effectively.
\ No newline at end of file
diff --git a/docs/python/python-oops.md b/docs/python/python-oops.md
deleted file mode 100644
index d34108ad..00000000
--- a/docs/python/python-oops.md
+++ /dev/null
@@ -1,185 +0,0 @@
----
-id: python-oops
-title: Object-Oriented Programming
-sidebar_label: OOPs in Python
-sidebar_position: 11
-tags:
- [
- Python,
- List in Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String,
- Tuple in Python
- Array in Python
- Functions in Python
- Recursion in Python
- ]
----
-
-# Object-Oriented Programming (OOPs) in Python
-
-Python is an **object-oriented programming language**, which means it supports concepts like **classes, objects, inheritance, polymorphism, encapsulation, and abstraction**.
-OOP allows developers to structure programs so that properties and behaviors are bundled into objects, making code **modular, reusable, and easier to maintain**.
-
----
-
-## 🔹 What is OOP?
-
-- **Object-Oriented Programming (OOP)** is a programming paradigm based on the concept of **objects**.
-- Each object can hold **data (attributes)** and **functions (methods)** that operate on that data.
-
- **Benefits of OOP in Python:**
-- Reusability of code
-- Encapsulation of data
-- Modularity and abstraction
-- Easier debugging and maintenance
-
----
-
-## 🔹 Classes and Objects
-
-A **class** is a blueprint for creating objects.
-An **object** is an instance of a class.
-
-```python
-# Defining a class
-class Person:
- def __init__(self, name, age):
- self.name = name
- self.age = age
-
- def greet(self):
- return f"Hello, my name is {self.name} and I am {self.age} years old."
-
-# Creating objects
-p1 = Person("Alice", 25)
-p2 = Person("Bob", 30)
-
-print(p1.greet()) # Output: Hello, my name is Alice and I am 25 years old.
-print(p2.greet()) # Output: Hello, my name is Bob and I am 30 years old.
-````
-
-
-
-## 🔹 Attributes and Methods
-
-* **Attributes** → Variables inside a class.
-* **Methods** → Functions defined inside a class.
-
-````python
-class Car:
- wheels = 4 # Class attribute
-
- def __init__(self, brand, model):
- self.brand = brand # Instance attribute
- self.model = model
-
- def info(self): # Instance method
- return f"{self.brand} {self.model} has {Car.wheels} wheels."
-
-c1 = Car("Tesla", "Model S")
-print(c1.info()) # Tesla Model S has 4 wheels.
-````
-
-## 🔹 Encapsulation
-
-Encapsulation means **restricting access** to certain variables/methods.
-In Python, we use:
-
-* `_protected_var` → convention for protected members
-* `__private_var` → name mangling for private members
-
-````python
-class BankAccount:
- def __init__(self, balance):
- self.__balance = balance # Private variable
-
- def deposit(self, amount):
- self.__balance += amount
-
- def get_balance(self):
- return self.__balance
-
-acc = BankAccount(1000)
-acc.deposit(500)
-print(acc.get_balance()) # 1500
-````
-
----
-
-## 🔹 Inheritance
-
-Inheritance allows a class (child) to acquire properties of another class (parent).
-
-````python
-# Base class
-class Animal:
- def speak(self):
- return "This is an animal."
-
-# Derived class
-class Dog(Animal):
- def speak(self):
- return "Woof! Woof!"
-
-class Cat(Animal):
- def speak(self):
- return "Meow!"
-
-d = Dog()
-c = Cat()
-print(d.speak()) # Woof! Woof!
-print(c.speak()) # Meow!
-````
-
-
-## 🔹 Polymorphism
-
-Polymorphism allows the same method name to perform different tasks depending on the object.
-
-````python
-for animal in [Dog(), Cat()]:
- print(animal.speak())
-
-# Output:
-# Woof! Woof!
-# Meow!
-````
-
-
-## 🔹 Abstraction
-
-Abstraction means **hiding implementation details** and showing only the necessary functionality.
-In Python, we use the `abc` module to create abstract classes.
-
-````python
-from abc import ABC, abstractmethod
-
-class Shape(ABC):
- @abstractmethod
- def area(self):
- pass
-
-class Circle(Shape):
- def __init__(self, radius):
- self.radius = radius
-
- def area(self):
- return 3.14 * self.radius * self.radius
-
-c = Circle(5)
-print(c.area()) # 78.5
-````
-
-## 🔹 Summary
-
-* **Class & Object** → Blueprint and instance
-* **Attributes & Methods** → Data and behavior inside a class
-* **Encapsulation** → Restricting access
-* **Inheritance** → Reusing parent class features
-* **Polymorphism** → Same function name, different behavior
-* **Abstraction** → Hiding unnecessary details
\ No newline at end of file
diff --git a/docs/python/python-recursion.md b/docs/python/python-recursion.md
deleted file mode 100644
index 5fbcbf7f..00000000
--- a/docs/python/python-recursion.md
+++ /dev/null
@@ -1,172 +0,0 @@
----
-id: python-recursion
-title: Recursion in Python
-sidebar_label: Recursion in Python
-sidebar_position: 12
-tags:
- [
- Python,
- List in Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String,
- Tuple in Python
- ]
-
----
-
-# Recursion in Python
-
-**Recursion** is a programming technique where a function calls itself directly or indirectly to solve a problem.
-It is often used to break down complex problems into smaller, simpler sub-problems.
-
----
-
-## Basic Structure of Recursion
-
-Every recursive function has two main parts:
-
-1. **Base Case** → Stops the recursion (prevents infinite calls).
-2. **Recursive Case** → Function calls itself with modified input.
-
-**Example:**
-```python
-def countdown(n):
- if n == 0: # Base case
- print("Time's up!")
- else: # Recursive case
- print(n)
- countdown(n-1)
-
-countdown(5)
-```
-
-```python
-Output:
-# 5
-# 4
-# 3
-# 2
-# 1
-# Time's up!
-````
-
-## Factorial using Recursion
-
-Factorial of `n` → `n! = n × (n-1) × (n-2) × ... × 1`
-
-```python
-def factorial(n):
- if n == 0 or n == 1: # Base case
- return 1
- else: # Recursive case
- return n * factorial(n-1)
-
-print(factorial(5)) # Output: 120
-```
-
-## Fibonacci Series using Recursion
-
-Fibonacci sequence → 0, 1, 1, 2, 3, 5, 8, ...
-
-```python
-def fibonacci(n):
- if n <= 1: # Base case
- return n
- else: # Recursive case
- return fibonacci(n-1) + fibonacci(n-2)
-
-for i in range(7):
- print(fibonacci(i), end=" ")
-# Output: 0 1 1 2 3 5 8
-```
-
-
-## Recursion vs Iteration
-
-* **Iteration (loops):** Uses `for` or `while` loops.
-* **Recursion:** Function calls itself.
-
-**Example: Sum of first n numbers**
-
-Recursive:
-
-```python
-def sum_recursive(n):
- if n == 0:
- return 0
- return n + sum_recursive(n-1)
-
-print(sum_recursive(5)) # Output: 15
-```
-
-Iterative:
-
-```python
-def sum_iterative(n):
- total = 0
- for i in range(1, n+1):
- total += i
- return total
-
-print(sum_iterative(5)) # Output: 15
-```
-
-
-## Advantages of Recursion
-
- Makes code **shorter and cleaner**
- Useful for problems naturally defined recursively (factorial, Fibonacci, tree traversal, divide and conquer algorithms)
-
-
-## Disadvantages of Recursion
-
- **Slower execution** than iteration (due to repeated function calls)
- **Memory usage is high** (function calls are stored in the call stack)
- Risk of **stack overflow error** if base case is missing
-
-
-## Tail Recursion in Python
-
-Tail recursion is when the **recursive call is the last statement** in the function.
-Unlike some languages, Python **does not optimize tail recursion**, so deep recursion may cause errors.
-
-```python
-def tail_sum(n, accumulator=0):
- if n == 0:
- return accumulator
- return tail_sum(n-1, accumulator+n)
-
-print(tail_sum(5)) # Output: 15
-```
-
-
-## Practical Example: Binary Search (Recursive)
-
-```python
-def binary_search(arr, target, low, high):
- if low > high:
- return -1 # Not found
-
- mid = (low + high) // 2
-
- if arr[mid] == target:
- return mid
- elif arr[mid] < target:
- return binary_search(arr, target, mid+1, high)
- else:
- return binary_search(arr, target, low, mid-1)
-
-nums = [1, 3, 5, 7, 9, 11]
-print(binary_search(nums, 7, 0, len(nums)-1)) # Output: 3
-```
-
-## Conclusion
-
-* Recursion is a function calling itself to solve smaller sub-problems.
-* Every recursive function must have a **base case** to avoid infinite calls.
-* Useful for problems like factorial, Fibonacci, searching, sorting, and tree/graph traversal.
-* While recursion makes code elegant, it may be slower and consume more memory than iteration.
\ No newline at end of file
diff --git a/docs/python/python-set.md b/docs/python/python-set.md
deleted file mode 100644
index b53020fb..00000000
--- a/docs/python/python-set.md
+++ /dev/null
@@ -1,250 +0,0 @@
----
-id: python-set
-title: Set in Python
-sidebar_label: Set in Python #displays in sidebar
-sidebar_position: 10
-tags:
- [
- Python,
- List in Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String,
- Tuple in Python,
- Set in Python
- ]
-
----
-
-# Set in Python
-
-A **Set** in Python is a built-in data structure used to store multiple **unique** elements in a single variable. Sets are **unordered** and **mutable**, making them an efficient tool for membership tests, eliminating duplicates, and performing mathematical set operations.
-
-
-## Why Use Sets?
-
-Sets are commonly used when:
-- You need to **store unique values only**
-- The order of elements **does not matter**
-- You want to perform **fast membership testing**
-- You need efficient **union, intersection, and difference operations**
-
-
-## Key Characteristics
-
-- **Unordered:** Elements have no defined order.
-- **Unique:** No duplicates allowed.
-- **Mutable:** You can add or remove items.
-- **Iterable:** You can loop through a set.
-
-
-## Creating a Set
-
-There are two main ways to create a set:
-
-### Using Curly Braces `{}`
-
-```python
-fruits = {"apple", "banana", "cherry"}
-print(fruits) # Output: {'banana', 'apple', 'cherry'}
-````
-
-### Using the `set()` Constructor
-
-```python
-numbers = set([1, 2, 3, 2])
-print(numbers) # Output: {1, 2, 3}
-```
-
-> **Important:** Empty curly braces `{}` create an **empty dictionary**, not a set. Use `set()` instead:
-
->
-> ```python
-> empty_set = set()
-> ```
-
-
-## Adding Elements to a Set
-
-You can add elements using the `add()` method:
-
-```python
-colors = {"red", "green"}
-colors.add("blue")
-print(colors) # Output: {'red', 'green', 'blue'}
-```
-
-## Removing Elements from a Set
-
-Python provides several methods to remove elements:
-
-### `remove()`
-
-Removes the specified item. Raises an error if the item does not exist.
-
-```python
-colors = {"red", "green"}
-colors.remove("red")
-print(colors) # Output: {'green'}
-```
-
-> If you try to remove an item not present:
->
-> ```python
-> colors.remove("yellow") # KeyError
-> ```
-
-
-### `discard()`
-
-Removes the specified item without raising an error if the item is not found.
-
-```python
-colors = {"green"}
-colors.discard("yellow") # No error
-```
-
-### `pop()`
-
-Removes and returns an arbitrary element.
-
-```python
-colors = {"red", "blue"}
-removed = colors.pop()
-print("Removed:", removed)
-print("Remaining:", colors)
-```
-
-
-### `clear()`
-
-Removes all elements.
-
-```python
-colors.clear()
-print(colors) # Output: set()
-```
-
-
-## Updating a Set
-
-To add multiple items at once, use `update()`:
-
-```python
-a = {1, 2}
-a.update([3, 4], {5, 6})
-print(a) # Output: {1, 2, 3, 4, 5, 6}
-```
-
-
-## Membership Testing
-
-Check if an item is in a set using `in` or `not in`:
-
-```python
-nums = {1, 2, 3}
-print(2 in nums) # Output: True
-print(5 not in nums) # Output: True
-```
-
-
-## Common Set Operations
-
-Python sets support powerful operations:
-
-| Operation | Syntax | Description | |
-| -------------------- | -------------------------------------- | ------------------------------------ | ----------------------------------- |
-| Union | \`a | b`or`a.union(b)\` | Combine all elements from both sets |
-| Intersection | `a & b` or `a.intersection(b)` | Elements common to both sets | |
-| Difference | `a - b` or `a.difference(b)` | Elements in `a` but not in `b` | |
-| Symmetric Difference | `a ^ b` or `a.symmetric_difference(b)` | Elements in either set, but not both | |
-
----
-
-### Example
-
-```python
-a = {1, 2, 3}
-b = {3, 4, 5}
-
-# Union
-print(a | b) # {1, 2, 3, 4, 5}
-
-# Intersection
-print(a & b) # {3}
-
-# Difference
-print(a - b) # {1, 2}
-
-# Symmetric Difference
-print(a ^ b) # {1, 2, 4, 5}
-```
-
----
-
-## Iterating Over a Set
-
-Loop through elements with a `for` loop:
-
-```python
-animals = {"cat", "dog", "rabbit"}
-for animal in animals:
- print(animal)
-```
-
-> Since sets are unordered, the output order may differ every time.
-
-
-## Frozenset
-
-A **frozenset** is an immutable version of a set. Once created, you cannot modify it.
-
-```python
-fs = frozenset([1, 2, 3])
-print(fs) # frozenset({1, 2, 3})
-
-# fs.add(4) # AttributeError
-```
-
-Use `frozenset` when you need a **hashable set**, e.g., as dictionary keys.
-
-
-## When to Use Sets?
-
-* Removing duplicates from lists
-* Fast membership tests
-* Performing set algebra (union, intersection)
-* Representing unique collections
-
-
-## Best Practices
-
-* Use `set()` to create empty sets.
-* Use `discard()` if you are not sure whether an element exists.
-* Prefer sets over lists when you need uniqueness or fast lookups.
-
----
-
-## Practice Exercises
-
-1. **Create a set of your favorite fruits. Add one more fruit and remove another.**
-2. **Find the union and intersection of `{1, 2, 3}` and `{3, 4, 5}`.**
-3. **Write a program that removes duplicates from a list using a set.**
-4. **Create a frozenset and show that it cannot be modified.**
-
----
-
-## Summary Table
-
-| Feature | Description |
-| --------------------- | -------------------------------------------- |
-| **Mutable** | Yes (can add/remove elements) |
-| **Ordered** | No |
-| **Duplicates** | Not allowed |
-| **Empty Declaration** | `set()` |
-| **Immutable Variant** | `frozenset` |
-| **Typical Use Cases** | Membership tests, uniqueness, set operations |
-
diff --git a/docs/python/python-string.md b/docs/python/python-string.md
deleted file mode 100644
index e693d7ff..00000000
--- a/docs/python/python-string.md
+++ /dev/null
@@ -1,197 +0,0 @@
----
-id: python-string
-title: String in Python
-sidebar_label: String in Python #displays in sidebar
-sidebar_position: 7
-tags:
- [
- Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String
- ]
-
----
-
-In Python, a **string** is a sequence of characters enclosed within **single (`'`)**, **double (`"`)**, or **triple quotes (`''' '''` or `""" """`)**.
-It is used to store and manipulate **textual data**.
-
-```python
-str1 = 'Hello'
-str2 = "World"
-str3 = '''This is a multi-line string.'''
-````
-
-## Creating Strings
-
-Strings can be created in several ways:
-
-```python
-name = "Dhruba"
-message = 'Welcome to Python'
-multiline = """This
-is a
-multiline string."""
-```
-
-## String Indexing and Slicing
-
-**Indexing**: Access characters by position (starting at index 0).
-
-```python
-text = "Python"
-print(text[0]) # P
-print(text[-1]) # n
-```
-
-**Slicing**: Extract a part of the string.
-
-```python
-print(text[0:3]) # Pyt
-print(text[::2]) # Pto
-print(text[1:-1]) # ytho
-```
-
-## String Methods
-
-| Method | Description |
-| ----------------- | ------------------------------------ |
-| `upper()` | Converts all characters to uppercase |
-| `lower()` | Converts all characters to lowercase |
-| `strip()` | Removes spaces from both ends |
-| `replace(a, b)` | Replaces `a` with `b` |
-| `startswith(val)` | Checks if string starts with `val` |
-| `endswith(val)` | Checks if string ends with `val` |
-| `find(val)` | Finds the first index of `val` |
-| `count(val)` | Counts occurrences of `val` |
-
-```python
-msg = " Hello Python "
-print(msg.upper()) # HELLO PYTHON
-print(msg.strip()) # Hello Python
-print(msg.replace("Python", "JS")) # Hello JS
-```
-
-## String Concatenation and Repetition
-
-**Concatenation** with `+`:
-
-```python
-first = "Hello"
-second = "World"
-print(first + " " + second) # Hello World
-```
-
-**Repetition** with `*`:
-
-```python
-print("Hi! " * 3) # Hi! Hi! Hi!
-```
-
-## Using `in` and `not in` Operators
-
-Check for substring presence:
-
-```python
-text = "Python is fun"
-print("fun" in text) # True
-print("Java" not in text) # True
-```
-
-## String Formatting
-
-### f-string (Python 3.6+)
-
-```python
-name = "Dhruba"
-age = 22
-print(f"My name is {name} and I am {age} years old.")
-```
-
-### format() method
-
-```python
-print("My name is {} and I am {} years old.".format(name, age))
-```
-
-### % operator
-
-```python
-print("My name is %s and I am %d years old." % (name, age))
-```
-
----
-
-## Escape Sequences
-
-Escape characters add special formatting in strings:
-
-| Escape | Meaning |
-| ------ | ------------ |
-| `\n` | New line |
-| `\t` | Tab space |
-| `\\` | Backslash |
-| `\'` | Single quote |
-| `\"` | Double quote |
-
-```python
-print("Hello\nWorld") # Line break
-print("Name:\tDhruba") # Tab
-```
-
-
-## Multiline Strings
-
-Triple quotes allow multi-line text:
-
-```python
-message = """This is line 1
-This is line 2
-This is line 3"""
-print(message)
-```
-
-
-## Use Cases and Examples
-
-### Greet user
-
-```python
-name = input("Enter your name: ")
-print(f"Welcome, {name}!")
-```
-
-### Count letters
-
-```python
-text = "banana"
-print(text.count("a")) # 3
-```
-
-### Read file and process
-
-```python
-with open("file.txt") as f:
- data = f.read()
- print(data.lower())
-```
-
-### Validate email domain
-
-```python
-email = "user@example.com"
-if email.endswith("@example.com"):
- print("Valid domain")
-```
-
-
-## Summary
-
-* Strings are **immutable** sequences of characters.
-* Support **indexing**, **slicing**, **concatenation**, and **repetition**.
-* Useful **methods** help in text processing.
-* Use **escape sequences** for formatting.
-* Use **f-strings** or `format()` for clean formatting.
diff --git a/docs/python/python-syntax.md b/docs/python/python-syntax.md
deleted file mode 100644
index 62ed1eb0..00000000
--- a/docs/python/python-syntax.md
+++ /dev/null
@@ -1,213 +0,0 @@
----
-id: python-syntax
-title: Python Syntax
-sidebar_label: Python Syntax #displays in sidebar
-sidebar_position: 2
-tags:
- [
- Python,
- Introduction of python,
- Python Syntax,
-
- ]
-
----
-
-# Python Syntax
-
-Python is known for its clean and readable syntax. It emphasizes code readability and allows developers to write fewer lines of code compared to other programming languages.
-
-### Basic Syntax Structure
-
-Python uses indentation instead of curly braces `{}` to define blocks of code.
-
-### Example:
-
-```python
-if 5 > 2:
- print("Five is greater than two!")
-````
-
-* **Indentation** is crucial in Python. Missing or incorrect indentation will raise an error.
-
-
-### Comments
-
-### Single-line comment:
-
-```python
-# This is a comment
-print("Hello, World!")
-```
-
-### Multi-line comment (using triple quotes):
-
-```python
-"""
-This is a
-multi-line comment
-"""
-print("Hello again!")
-```
-
----
-
-### Variables
-
-Python does not require you to declare the type of a variable.
-
-```python
-x = 10 # integer
-y = "Hello" # string
-z = 3.14 # float
-```
-
-### Multiple assignment:
-
-```python
-a, b, c = 1, 2, 3
-```
-
----
-
-### Data Types
-
-Some common data types in Python:
-
-* `int`: Integer
-* `float`: Floating point
-* `str`: String
-* `bool`: Boolean
-* `list`: List of items
-* `tuple`: Immutable list
-* `dict`: Key-value pair
-* `set`: Unique unordered collection
-
-```python
-num = 10 # int
-name = "Alice" # str
-items = [1, 2, 3] # list
-person = {"name": "Bob", "age": 25} # dict
-```
-
----
-
-### Conditionals
-
-```python
-age = 18
-
-if age >= 18:
- print("Adult")
-elif age > 12:
- print("Teenager")
-else:
- print("Child")
-```
-
----
-
-### Loops
-
-### `for` loop:
-
-```python
-for i in range(5):
- print(i)
-```
-
-### `while` loop:
-
-```python
-count = 0
-while count < 5:
- print(count)
- count += 1
-```
-
----
-
-### Functions
-
-Functions are defined using the `def` keyword.
-
-```python
-def greet(name):
- print("Hello, " + name)
-
-greet("Alice")
-```
-
-### Return statement:
-
-```python
-def add(a, b):
- return a + b
-
-result = add(2, 3)
-print(result) # Output: 5
-```
-
----
-
-### Modules and Imports
-
-You can import built-in or custom modules.
-
-```python
-import math
-
-print(math.sqrt(16)) # Output: 4.0
-```
-
----
-
-### Operators
-
-### Arithmetic Operators:
-
-```python
-+ - * / // % **
-```
-
-### Comparison Operators:
-
-```python
-== != > < >= <=
-```
-
-### Logical Operators:
-
-```python
-and or not
-```
-
----
-
-### Indentation Rules
-
-Python uses **4 spaces** (by convention) for indentation. Do not mix tabs and spaces.
-
-Incorrect:
-
-```python
-if True:
-print("Hello") # IndentationError
-```
-
-Correct:
-
-```python
-if True:
- print("Hello")
-```
-
----
-
-## Conclusion
-
-Python syntax is simple, readable, and beginner-friendly. With its use of indentation and minimalistic style, it allows you to focus on solving problems rather than worrying about complex syntax rules.
-
----
-
-> 📌 **Note**: Make sure your Python files have the `.py` extension and you're using Python 3.x version for compatibility with modern features.
diff --git a/docs/python/python-tuple.md b/docs/python/python-tuple.md
deleted file mode 100644
index 5e3f6610..00000000
--- a/docs/python/python-tuple.md
+++ /dev/null
@@ -1,199 +0,0 @@
----
-id: python-tuple
-title: Tuple in Python
-sidebar_label: Tuples in Python #displays in sidebar
-sidebar_position: 9
-tags:
- [
- Python,
- List in Python,
- Introduction of python,
- Python Syntax,
- Variables,
- Operators,
- Type Casting,
- String,
- Tuple in Python
- ]
-
----
-
-
-# Tuples in Python
-
-A **Tuple** is an immutable, ordered collection of elements.
-Unlike lists, **tuples cannot be changed after creation**, which makes them useful for storing fixed collections of data.
-
-
-## Creating a Tuple
-
-Tuples are created using parentheses `()` or simply commas:
-
-```python
-# Empty Tuple
-empty_tuple = ()
-
-# Tuple with multiple items
-fruits = ("apple", "banana", "cherry")
-
-# Tuple without parentheses (comma-separated)
-numbers = 1, 2, 3
-
-# Single-element Tuple (Note the comma!)
-single = ("hello",)
-````
-
-**Important:** Without the comma, Python does not recognize it as a tuple:
-
-```python
-not_a_tuple = ("hello") # This is a string, NOT a tuple
-```
-
-
-## Accessing Elements
-
-Use indexing just like lists:
-
-```python
-fruits = ("apple", "banana", "cherry")
-
-print(fruits[0]) # apple
-print(fruits[1]) # banana
-print(fruits[-1]) # cherry
-```
-
-
-## Slicing Tuples
-
-Tuples support slicing operations:
-
-```python
-numbers = (10, 20, 30, 40, 50)
-
-print(numbers[1:4]) # (20, 30, 40)
-print(numbers[:3]) # (10, 20, 30)
-print(numbers[2:]) # (30, 40, 50)
-```
-
-
-## Tuple Immutability
-
-Tuples cannot be modified after creation:
-
-```python
-fruits = ("apple", "banana", "cherry")
-
-# This will raise an error:
-fruits[1] = "mango"
-```
-
-**Output:**
-
-```
-TypeError: 'tuple' object does not support item assignment
-```
-
-This property makes tuples **safe for constant data**, like coordinates, fixed configurations, etc.
-
-
-## Tuple Methods
-
-Tuples have only **two built-in methods**:
-
-| Method | Description |
-| ---------- | ------------------------------------------------ |
-| `count(x)` | Counts how many times `x` occurs in the tuple |
-| `index(x)` | Returns the index of the first occurrence of `x` |
-
-### Example
-
-```python
-numbers = (1, 2, 3, 2, 2, 4)
-
-print(numbers.count(2)) # 3
-print(numbers.index(3)) # 2
-```
-
-
-## Tuple Packing and Unpacking
-
-**Packing:** Combining values into a tuple:
-
-```python
-data = "John", 25, "Engineer"
-print(data) # ('John', 25, 'Engineer')
-```
-
-**Unpacking:** Assigning tuple elements to variables:
-
-```python
-name, age, profession = data
-
-print(name) # John
-print(age) # 25
-print(profession) # Engineer
-```
-
-
-## Nested Tuples
-
-Tuples can contain other tuples or collections:
-
-```python
-nested = (
- (1, 2, 3),
- ("a", "b", "c"),
- (True, False)
-)
-
-print(nested[1]) # ('a', 'b', 'c')
-print(nested[1][2]) # 'c'
-```
-
-
-## Tuple vs. List
-
-| Feature | Tuple | List |
-| ----------- | ------------------------- | ------------------------------ |
-| Syntax | `(1, 2, 3)` | `[1, 2, 3]` |
-| Mutability | Immutable (cannot change) | Mutable (can change) |
-| Methods | count(), index() only | Many built-in methods |
-| Use Case | Fixed data, safe storage | Dynamic data, frequent changes |
-| Performance | Slightly faster | Slightly slower |
-
-
-## When to Use Tuples
-
-**Use tuples when:**
-
-* Data should **not change**.
-* You need **hashable** objects (e.g., as dictionary keys).
-* You want to protect data integrity.
-
-**Examples:**
-
-* Geographic coordinates: `(latitude, longitude)`
-* RGB color codes: `(255, 255, 255)`
-* Database records
-
-
-## Tuple Comprehension
-
-**Note:** Python does NOT have tuple comprehensions.
-However, you can use a **generator expression** in parentheses:
-
-```python
-gen = (x*x for x in range(5))
-print(gen) #
-```
-
-To create a tuple from it, use `tuple()`:
-
-```python
-squares = tuple(x*x for x in range(5))
-print(squares) # (0, 1, 4, 9, 16)
-```
-
-## Conclusion
-
-Tuples are a **fundamental** data type in Python, providing a simple, efficient, and immutable way to store ordered data. Understanding when to choose a tuple over a list is essential for writing clear and robust code.
\ No newline at end of file
diff --git a/docs/python/python-variables.md b/docs/python/python-variables.md
deleted file mode 100644
index b8de8f5d..00000000
--- a/docs/python/python-variables.md
+++ /dev/null
@@ -1,240 +0,0 @@
----
-id: python-variables
-title: Python Variables
-sidebar_label: Python Variables #displays in sidebar
-sidebar_position: 3
-tags:
- [
- Python,
- Introduction of python,
- Python Syntax,
- Python Variables,
-
- ]
-
----
-
-# Python Variables
-
-In Python, variables are used to store data that can be referenced and manipulated during program execution. A variable is essentially a name that is assigned to a value. Unlike many other programming languages, Python variables do not require explicit declaration of type. The type of the variable is inferred based on the value assigned.
-
-Variables act as placeholders for data. They allow us to store and reuse values in our program.
-
-
-### 1. What is a Variable?
-
-A variable is like a container for storing data values. You don’t need to declare its type explicitly — Python handles it dynamically.
-
-```python
-x = 5
-y = "Hello"
-````
-
-Here:
-
-* `x` is of type `int`
-* `y` is of type `str`
-
-
-
-### 2. How to Declare and Assign Variables
-
-You simply write a variable name, use the assignment `=` operator, and assign a value.
-
-```python
-a = 10
-name = "GeeksForGeeks"
-price = 99.99
-is_active = True
-```
-
-Python automatically understands the type of variable.
-
-
-### 3. Multiple Assignments in One Line
-
-Python allows assigning values to multiple variables in a single line.
-
-```python
-x, y, z = 1, 2, 3
-```
-
-You can also assign **same value to multiple variables**:
-
-```python
-a = b = c = 100
-```
-
-
-### 4. Variable Naming Rules
-
-* Must start with a letter (a–z, A–Z) or an underscore (\_)
-* Can contain letters, digits, and special character like underscore.
-* Are case-sensitive (`name` and `Name` are different).
-* Cannot use reserved keywords like `if`, `class`, `def`, etc.
-
-```python
-# Valid
-my_var = 1
-_var = 2
-var3 = 3
-
-# Invalid
-3var = 10 # starts with digit
-my-var = 20 # hyphen not allowed
-def = 30 # 'def' is a keyword
-```
-
-
-### 5. Standard Data Types in Python
-
-Python variables can hold different types of data:
-
-
-
-
-### 6. Type Checking with `type()`
-
-```python
-x = 10
-print(type(x)) #
-```
-
-
-
-### 7. Changing Variable Type Dynamically
-
-Python allows dynamic typing:
-
-```python
-x = 5
-print(type(x)) #
-
-x = "Hello"
-print(type(x)) #
-```
-
-
-### 8. Deleting a Variable with `del`
-
-You can remove a variable from memory using `del`.
-
-```python
-x = 100
-del x
-
-print(x) # Raises NameError
-```
-
-
-### 9. Scope of Variables
-
-There are **two scopes of variables**:
-
-### 10. Global Variable
-
-Declared outside functions, accessible anywhere.
-
-```python
-x = "global"
-
-def show():
- print(x)
-
-show() # Output: global
-```
-
-### 11. Local Variable
-
-Declared inside functions and accessible only inside them.
-
-```python
-def greet():
- msg = "Hello"
- print(msg)
-
-greet()
-print(msg) # Error: NameError
-```
-
-
-
-### 🟢 The `global` Keyword
-
-Use `global` to modify global variables inside a function.
-
-```python
-x = 10
-
-def update():
- global x
- x = 20
-
-update()
-print(x) # Output: 20
-```
-
-
-### 12. Memory Management in Python
-
-* Python variables are **names** bound to **objects in memory**.
-* Use `id()` to get the memory address (or reference ID) of a variable.
-
-```python
-x = 5
-print(id(x))
-```
-
-If two variables have the same immutable value, they may share the same memory.
-
-```python
-a = 100
-b = 100
-print(id(a) == id(b)) # True
-```
-
-
-### 🟢 Example Program
-
-```python
-# Python Variable Example
-
-name = "Dhruba"
-age = 22
-price = 49.99
-is_valid = True
-items = ["pen", "notebook"]
-
-print("Name:", name)
-print("Age:", age)
-print("Price:", price)
-print("Valid:", is_valid)
-print("Items:", items)
-```
-
-**Output:**
-
-```
-Name: Dhruba
-Age: 22
-Price: 49.99
-Valid: True
-Items: ['pen', 'notebook']
-```
-
-
-## Summary
-
-* Python variables store different types of data without explicit declaration.
-* Variables are case-sensitive and follow naming rules.
-* Scope determines where a variable is accessible.
-* `global` and `del` are important keywords for variable handling.
-* Python handles memory management internally but allows inspection via `id()`.
-
-
-### Highlights
-
-* Covers both global and local variables
-* Explains `del`, `global`, and `id()` functions
-* Includes formatted tables and output blocks
-* Beginner-friendly explanation with examples
diff --git a/docs/python/python_oops.md b/docs/python/python_oops.md
deleted file mode 100644
index 6c2bc2ed..00000000
--- a/docs/python/python_oops.md
+++ /dev/null
@@ -1,129 +0,0 @@
----
-id: python-OOPs
-title: Python OOPs concept
-sidebar_label: Python OOPs concept #displays in sidebar
-sidebar_position: 19
-author: Seema Kumari Patel
-description: OOPs concept in Python
-tags:
- [
- Python,
- Introduction of python,
- Python Syntax,
- Python Variables,
- Python Operators,
- ]
----
-
-
-# Python OOPs concept
-
-**OOP** is a way of organizing code that uses objects and classes to represent real-world entities and their behavior. In OOP, object has attributes thing that has specific data and can perform certain actions using methods.
-
-
-Characteristics of OOP (Object Oriented Programming)
-Python supports the core principles of object-oriented programming, which are the building blocks for designing robust and reusable software. The diagram below demonstrates these core principles:
-
-1. Class - A blueprint for creating objects, learn more
-
-📌 **Use Case**: create a class - car
-
-```python
-class Car:
- def __init__(self, brand, model):
- self.brand = brand
- self.model = model
-
- def start(self):
- print(f"{self.brand} {self.model} is starting...")
-```
-
-2. Object - An instance of a class.
-
-📌 **Use Case**: instantiate the variables
-
-```python
-my_car = Car("Tesla", "Model S")
-my_car.start() # Tesla Model S is starting...
-```
-
-
-3. Encapsulation - Hiding the internal details and only exposing necessary parts.
-
-📌 **Use Case**: Not letting data to be accessed by other class
-
-```python
-class BankAccount:
- def __init__(self, balance):
- self.__balance = balance # private variable
-
- def deposit(self, amount):
- self.__balance += amount
-
- def get_balance(self):
- return self.__balance
-```
-
-
-4. Inheritance - One class can inherit from another.
-
-📌 **Use Case**: Car (parent) class is inherited by ElectricCar (child) class
-
-```python
-class ElectricCar(Car):
- def __init__(self, brand, model, battery):
- super().__init__(brand, model)
- self.battery = battery
-
- def battery_info(self):
- print(f"Battery: {self.battery} kWh")
-
-tesla = ElectricCar("Tesla", "Model X", 100)
-tesla.start()
-tesla.battery_info()
-```
-
-
-5. Polymorphism - Same function name, but different behavior depending on the object.
-
-📌 **Use Case**: Different classes using single method for different purposes.
-
-```python
-class Dog:
- def speak(self):
- return "Woof!"
-
-class Cat:
- def speak(self):
- return "Meow!"
-
-pets = [Dog(), Cat()]
-for pet in pets:
- print(pet.speak()) # Woof! / Meow!
-```
-
-
-6. Abstraction - Hiding implementation details, showing only essential features (using abc module).
-
-📌 **Use Case**: Hiding low level details
-
-```python
-from abc import ABC, abstractmethod
-
-class Shape(ABC):
- @abstractmethod
- def area(self):
- pass
-
-class Circle(Shape):
- def __init__(self, radius):
- self.radius = radius
-
- def area(self):
- return 3.14 * self.radius ** 2
-
-c = Circle(5)
-print(c.area()) # 78.5
-```
-
-
diff --git a/docs/python/python_operators.md b/docs/python/python_operators.md
deleted file mode 100644
index 7fd6c751..00000000
--- a/docs/python/python_operators.md
+++ /dev/null
@@ -1,260 +0,0 @@
----
-id: python-operators
-title: Python Operators
-sidebar_label: Python Operators #displays in sidebar
-sidebar_position: 5
-tags:
- [
- Python,
- Introduction of python,
- Python Syntax,
- Python Variables,
- Python Operators,
-
- ]
-
----
-
-
-# Python Operators
-
-In Python, **operators** are special symbols used to perform operations on variables and values. Python supports a wide range of operators categorized based on their functionality.
-
-
-Used to perform basic mathematical operations:
-
-| Operator | Description | Example | Result |
-|----------|-------------------|-----------|--------|
-| `+` | Addition | `10 + 5` | `15` |
-| `-` | Subtraction | `10 - 5` | `5` |
-| `*` | Multiplication | `10 * 5` | `50` |
-| `/` | Division | `10 / 5` | `2.0` |
-| `//` | Floor Division | `10 // 3` | `3` |
-| `%` | Modulus (remainder)| `10 % 3` | `1` |
-| `**` | Exponentiation | `2 ** 3` | `8` |
-
-
-## Comparison Operators
-
-Used to compare two values and return a Boolean result (`True` or `False`).
-
-| Operator | Description | Example | Result |
-|----------|----------------------|-------------|--------|
-| `==` | Equal to | `5 == 5` | `True` |
-| `!=` | Not equal to | `5 != 3` | `True` |
-| `>` | Greater than | `5 > 3` | `True` |
-| `<` | Less than | `5 < 3` | `False`|
-| `>=` | Greater than or equal| `5 >= 5` | `True` |
-| `<=` | Less than or equal | `5 <= 3` | `False`|
-
-
-## Logical Operators
-
-Used to combine conditional statements here.
-
-| Operator | Description | Example | Result |
-|----------|-----------------------------------|----------------------|--------|
-| `and` | True if both operands are true | `True and False` | `False`|
-| `or` | True if at least one is true | `True or False` | `True` |
-| `not` | Reverses the result | `not True` | `False`|
-
-
-## Assignment Operators
-
-Used to assign values to variables.
-
-| Operator | Example | Same as |
-|----------|----------|----------------|
-| `=` | `x = 5` | Assign 5 to x |
-| `+=` | `x += 3` | `x = x + 3` |
-| `-=` | `x -= 2` | `x = x - 2` |
-| `*=` | `x *= 4` | `x = x * 4` |
-| `/=` | `x /= 2` | `x = x / 2` |
-| `//=` | `x //= 2`| `x = x // 2` |
-| `%=` | `x %= 2` | `x = x % 2` |
-| `**=` | `x **= 2`| `x = x ** 2` |
-
-
-## Bitwise Operators
-
-Used to perform bit-level operations.
-
-| Operator | Description | Example | Result |
-|----------|-------------|-----------|--------|
-| `&` | AND | `5 & 3` | `1` |
-| `|` | OR | `5 | 3` | `7` |
-| `^` | XOR | `5 ^ 3` | `6` |
-| `~` | NOT | `~5` | `-6` |
-| `<<` | Left Shift | `5 << 1` | `10` |
-| `>>` | Right Shift | `5 >> 1` | `2` |
-
-
-## Membership Operators
-
-Used to test if a sequence contains a value.
-
-| Operator | Description | Example | Result |
-|------------|------------------------------|----------------------|--------|
-| `in` | Value exists in the sequence | `"a" in "apple"` | `True` |
-| `not in` | Value not in sequence | `"z" not in "apple"` | `True` |
-
-
-## Identity Operators
-
-Used to compare the memory location of two objects.
-
-| Operator | Description | Example | Result |
-|------------|-------------------------------------|-------------|--------|
-| `is` | Returns `True` if same object | `x is y` | `True` |
-| `is not` | Returns `True` if not same object | `x is not y`| `True` |
-
-
-
-## Use Cases of Python Operators
-
----
-
-### 1. **Arithmetic Operators**
-
-📌 **Use Case**: Shopping Cart Total
-
-```python
-price = 150
-quantity = 3
-total = price * quantity # ➜ 450
-discount = 0.10
-final_amount = total - (total * discount) # ➜ 405.0
-```
-
-**Explanation**: Calculates the total bill with a discount using `*` and `-`.
-
----
-
-### 2. **Comparison Operators**
-
-📌 **Use Case**: Age Verification for Voting
-
-```python
-age = 17
-if age >= 18:
- print("Eligible to vote")
-else:
- print("Not eligible")
-```
-
-**Explanation**: Compares age using `>=` to determine eligibility.
-
----
-
-### 3. **Logical Operators**
-
-📌 **Use Case**: Login System Authentication
-
-```python
-username = "admin"
-password = "1234"
-
-if username == "admin" and password == "1234":
- print("Login successful")
-else:
- print("Invalid credentials")
-```
-
-**Explanation**: Combines two conditions using `and`.
-
----
-
-### 4. **Assignment Operators**
-
-📌 **Use Case**: Updating Game Score
-
-```python
-score = 0
-score += 10 # Player scored
-score += 5 # Bonus
-# Final score = 15
-```
-
-**Explanation**: Increments the score using `+=`.
-
----
-
-### 5. **Bitwise Operators**
-
-📌 **Use Case**: File Permission System (Read = 4, Write = 2, Execute = 1)
-
-```python
-read = 4
-write = 2
-execute = 1
-
-permission = read | write # ➜ 6 (read + write)
-has_write = permission & write # ➜ 2 (True)
-```
-
-**Explanation**: Combines permissions using `|` and checks with `&`.
-
----
-
-### 6. **Membership Operators**
-
-📌 **Use Case**: Search Term Filtering
-
-```python
-query = "python"
-if "python" in ["java", "python", "c++"]:
- print("Result found")
-```
-
-**Explanation**: Checks if a word exists in a list using `in`.
-
----
-
-### 7. **Identity Operators**
-
-📌 **Use Case**: Comparing Object Identity
-
-```python
-x = [1, 2, 3]
-y = x
-z = [1, 2, 3]
-
-print(x is y) # True
-print(x is z) # False
-```
-
-**Explanation**: Uses `is` to check if variables point to the same object in memory.
-
----
-
-### 8. **Operator Precedence**
-
-📌 **Use Case**: Evaluating an Expression
-
-```python
-result = 10 + 5 * 2 # ➜ 10 + (5 * 2) = 20
-```
-
-**Explanation**: `*` is evaluated before `+` due to higher precedence.
-
----
-
-## Summary Table
-
-| Operator Type | Example Use Case |
-| ------------- | ---------------------------------- |
-| Arithmetic | Calculating total cost |
-| Comparison | Validating age for access |
-| Logical | Checking login credentials |
-| Assignment | Updating scores or counters |
-| Bitwise | Managing file permissions (bits) |
-| Membership | Search and filter operations |
-| Identity | Verifying object references |
-| Precedence | Proper expression evaluation order |
-
-
-
-## Conclusion
-
-Operators are the core building blocks of logic and calculation in Python. Understanding how they work is crucial to writing effective Python code.
-
diff --git a/docs/python/setup-environment.md b/docs/python/setup-environment.md
deleted file mode 100644
index 357e0c7f..00000000
--- a/docs/python/setup-environment.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-id: setup-environment
-title: Setting up your development environment
-sidebar_label: Setting up environment
-sidebar_position: 14
-tags:
- [
- html,
- web-development,
- front-end-development,
- web-design,
- development-environment,
- web-technology,
- web-pages,
- web-browsers,
- web-technology,
- setup-environment,
- ]
-description: In this tutorial, you will learn how to set up your development environment for HTML development.
----
-
-Install Python
-
- ### Step 1: Let’s Download the git.
-
- 1. Go to the [Git Website](https://git-scm.com/) and click on download for windows button.
-
-
- [](https://git-scm.com/)
-
-
-
- ### Step 2: Select your Version you want to install.
-
- 1. Get your Installer:
-
- Based on your current version of Windows, you can choose either the standalone installer or Windows installer to get started. Since my system is 64-bit, I'll choose the 64-bit option. You can check which system type you have by right clicking ``This PC`` icon, selecting ``Properties``, and looking under ``System type``.
-
- - **Installer:** Get the Installer
-
- [](https://git-scm.com/downloads/win)
-
-
-
- - **Start Installation:** Upon downloading, open the installer.
-
-
-
- [](https://git-scm.com/)
-
-
- - 1. On the next screen, click next on Public Licence.
- - 2. Choose the location as default and click on Next
-
-
-
- ### Step 3: Understanding the Interface.
-
- In the next step, Git will ask you to install couple of components. You can check on additional icons to add on Desktop and leave the rest as default and click on Next.
-
- - 1. On the next screen click next , make sure the start folder name is Git.
- - 2. Next option is to choose the default editor you can use your editor, I'm using Visual Studio Code. Or keep Vim as the default editor.
-
-
-
- [](https://git-scm.com/)
-
-
-
- ### Step 5: Adjusting name of the repo setting in Git.
-
- At this stage it will ask you to choose an initial branch in a new repository, it would be ideal approach to choose the second option, as we move further it gives us flexibility to change the intial branch name , like main master, trunk.
-
-
-
- [](https://github.com/sanjay-kv)
-
-
-
- ### Step 5: Adjusting Your path enviornment.
-
- This is where we specify the path enviornment of git, just go with the recommended option which is 2.
-
-
- [](https://github.com/sanjay-kv)
-
-
-
- 1. ``1`` In the next screen choose the SSH Executable, pick ``use bundled OpenSSH`` which is the default option.
- 2. ``2`` In the next step, you'll be asked configuring the line ending conversions, you should keep it default which is option 1.
- 3. ``3`` Next step will be configuring the terminal emulator to use the git bash. Keep the default which is option 1.
- 4. ``4`` Next option is to choose the defualt option to use the git. use the default one which is the Fast-forward and merge option 1.
- 5. ``5`` In the Credential helper section, choose ``Git Credential Manager``, then click Next.
- 6. ``6`` Enable the extra option by selecting ``Enable the file system Caching`` then click Next again.
- 7. ``7`` On the Next Screen, it will ask whether you want to enable expiremental support. Select both options and click Install.
-
-
- [](https://github.com/sanjay-kv)
-
-
- Congratulations! The Git setup is now complete and you can launch GitHub.
-
- After installation, you'll find new application in your PC’s program list, such as ‘Git Bash’, ‘Git GUI’, ‘Git CMD’. We'll mainly use Git Bash for uploading our projects.
-
- Execute the below command to see your current version of git in Git CMD or windows command promt. Git Installation on Windows is completed.
-
- ```html title="create a new repository on the command line"
- git --version
- ```
-
-
- ## Conclusion
-
- I hope you enjoyed reading this article on “Setting up your Git Enviornment”. In the next post, we'll discuss how to create a Repository and clone a project from Github.
- Signing off,
- Sanjay Viswanathan.
diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 43a3388e..f2ebea8d 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -124,7 +124,6 @@ const config: Config = {
Tutorials
Coming Soon: Advanced data tools tutorials, cloud technologies, and more!",
+ "We offer a comprehensive range of learning resources across multiple technologies: