Number Guessing Game in Python CSE April 26, 2026 Number Guessing Game in Python This is a simple beginner mini project using: random module while loop if-elif-else conditions user inpu... Continue Reading
Python - ATM mini project using conditions and loops CSE April 26, 2026 ATM Mini Project Using Conditions and Loops in Python This beginner project uses: if-else while loop variables input/output basic ATM ope... Continue Reading
Add Two Numbers in Python CSE April 26, 2026Add Two Numbers in Python This is one of the first and easiest Python programs for beginners. The goal is to take two numbers from the user ... Continue Reading
generate electricity bill in python program CSE January 03, 2026 def calculate_electricity_bill(units): """ Calculates the electricity bill based on tiered unit charges. Args: ... Continue Reading
BST - BINARY SEARCH TREE - PYTHON CSE December 24, 2025 # Binary Search Tree implementation with user interaction class Node: def __init__(self, key): self.key = key self.left... Continue Reading
Python - Double Linked List CSE December 24, 2025This program includes methods for inserting at the beginning and end, and deleting a specific node by its value. # -----------------------... Continue Reading
Python - Single Linked List CSE December 23, 2025 Python - Single Linked List class Node: """Represents a single node in the linked list.""" def __init... Continue Reading
Write a python program to implement Queues. CSE December 23, 2025 Write a python program to implement Queues. from collections import deque class Queue: def __init__(self): self.queue = deque()... Continue Reading
Write a program to implement Stacks in python. CSE December 23, 2025 Write a program to implement Stacks. class Stack: def __init__(self): self.stack = [] def push(self, item): "... Continue Reading
Selection Sort - Python CSE December 23, 2025 def selection_sort(arr): """ Sorts a list of elements using the selection sort algorithm. """ ... Continue Reading
Merge Sort in Python – Explanation, Algorithm, and Program CSE December 23, 2025Sorting is one of the most important operations in computer science. It is used to arrange data in a specific order, usually ascending or de... Continue Reading
Quick Sort - Python CSE December 23, 2025 def quick_sort_simple(arr): if len(arr) <= 1: return arr # Base case: a list with 0 or 1 element is already sorted else... Continue Reading
Python - Bubble Sort CSE December 23, 2025 def bubble_sort(arr): """ Sorts a list of elements in ascending order using the bubble sort algorithm. Args: ... Continue Reading
Python - Binary Search CSE December 23, 2025 def binary_search(arr, target): low = 0 high = len(arr) - 1 while low <= high: mid = (low + high) // 2 if a... Continue Reading
write a program for linear search in python. CSE December 23, 2025 write a program for linear search in python. def linear_search(arr, target): """ Returns the index of target if foun... Continue Reading
Write a Python program to generate the combinations of n distinct objects taken from the elements of a given list. Example: Original list: [1, 2, 3, 4, 5, 6, 7, 8, 9] Combinations of 2 distinct objects: [1, 2] [1, 3] [1, 4] [1, 5] .... [7, 8] [7, 9] [8, 9] CSE December 23, 2025 Write a Python program to generate the combinations of n distinct objects taken from the elements of a given list. Example: Original list: ... Continue Reading
Write a Python program to illustrate the following comprehensions: a) List Comprehensions b) Dictionary Comprehensions c) Set Comprehensions d) Generator Comprehensions CSE December 23, 2025 Write a Python program to illustrate the following comprehensions: a) List Comprehensions b) Dictionary Comprehensions c) Set Comprehension... Continue Reading
Write a python program to implement Method Overriding. CSE December 23, 2025 Write a python program to implement Method Overriding. class Animal: """A parent class representing an animal."... Continue Reading
Write a python program to implement Method Overloading. CSE December 23, 2025 Write a python program to implement Method Overloading. 1. Using Default Arguments class Calculator: # Simulates overloading the 'a... Continue Reading
Python - Develop an inheritance hierarchy based upon a Polygon class that has abstract methods area( ) and perimeter( ). Implement classes Triangle, Quadrilateral, Pentagon, that extend this base class, with the obvious meanings for the area( ) and perimeter( ) methods. Write a simple program that allows users to create polygons of the various types and input their geometric dimensions, and the program then outputs their area and perimeter. CSE December 23, 2025 Develop an inheritance hierarchy based upon a Polygon class that has abstract methods area( ) and perimeter( ). Implement classes Triangle,... Continue Reading