Python Articles

Page 33 of 855

Basic Gantt Chart Using Python Matplotlib

Pranavnath
Pranavnath
Updated on 27-Mar-2026 5K+ Views

Project management requires careful planning, organization, and tracking of tasks and timelines. Gantt charts provide a visual representation of project schedules, task durations, and dependencies, enabling project managers to effectively plan, monitor, and communicate project progress. In this article, we'll create basic Gantt charts using Python's powerful Matplotlib library. By leveraging Matplotlib's plotting capabilities, we can create dynamic and informative Gantt charts for project visualization and decision-making. What is a Gantt Chart? A Gantt chart is a horizontal bar chart that displays project tasks along a timeline. Each task is represented as a horizontal bar, where the ...

Read More

Random Password Generator using Python Tkinter

Pranavnath
Pranavnath
Updated on 27-Mar-2026 1K+ Views

The tkinter module in Python provides a simple and efficient way to create graphical user interfaces (GUI). Using tkinter, you can build a random password generator application with an interactive window. The interface typically includes a button to trigger password generation and a label to display the generated password. Within the password generation function, characters are randomly selected from a defined set of alphanumeric characters and special symbols. The generated password is then displayed in the label widget. Advantages of Using Tkinter for Password Generation User-friendly GUI − tkinter provides a straightforward way to design graphical interfaces, allowing ...

Read More

Real time currency converter using Python Tkinter

Pranavnath
Pranavnath
Updated on 27-Mar-2026 2K+ Views

In today's globalized world, currency conversion plays an essential role in various financial transactions and international exchanges. Whether you're planning a trip overseas, managing foreign investments, or running multinational business, having access to real-time currency conversion is crucial. In this article, we'll explore how to build a real-time currency converter using Python Tkinter, a popular GUI toolkit. By leveraging the power of Python and Tkinter, we can create an intuitive and user-friendly application that performs accurate currency conversions with an interactive interface for users to input amounts and select currencies. Currency Converter using Python Tkinter Real-time currency ...

Read More

Print Python list elements in circular range

Pranavnath
Pranavnath
Updated on 27-Mar-2026 597 Views

The list data structure in Python holds elements of different data types like integers, strings, or float numbers. Printing list elements in a circular range means starting from any index and wrapping around to the beginning when reaching the end, creating sublists of a specified length. What is Circular Range? In a circular range, if you have a list [5, 6, 7, 8] and want sublists of length 4 starting from each position, you get: Starting from index 0: [5, 6, 7, 8] Starting from index 1: [6, 7, 8, 5] (wraps around) Starting from index ...

Read More

Python – Program that matches a word containing ‘g’ followed by one or more e’s using regex

Pranavnath
Pranavnath
Updated on 27-Mar-2026 171 Views

Regular expressions (regex) in Python provide powerful pattern matching capabilities. In this tutorial, we'll learn how to match words containing 'g' followed by one or more 'e' characters using different regex methods. Understanding the Regex Pattern The pattern r'\bge+\w*\b' breaks down as follows ? \b − Word boundary to match complete words g − Literal character 'g' e+ − One or more 'e' characters \w* − Zero or more word characters (optional) \b − Word boundary at the end Method 1: Using findall() Function The findall() method returns all non-overlapping matches as a ...

Read More

Print diagonals of 2D list in Python

Pranavnath
Pranavnath
Updated on 27-Mar-2026 1K+ Views

Python provides powerful features for working with two-dimensional data structures. One common task is extracting diagonal elements from a 2D list (matrix). This article demonstrates how to print both major and minor diagonals using simple iteration methods. Understanding Matrix Diagonals Before extracting diagonals, let's understand the concept with a visual representation: ...

Read More

Python - Print alphabets till N

Pranavnath
Pranavnath
Updated on 27-Mar-2026 780 Views

Python provides several ways to print alphabets up to a specified position N. When N is 5, for example, the program prints the first 5 letters: a, b, c, d, e. This is useful for creating patterns, educational programs, and understanding ASCII character manipulation. Understanding the Problem In the English alphabet, there are 26 letters total. When we specify N=5, we want to print the first 5 letters (a through e). The position N determines how many alphabets to display from the beginning. Using the String Module The string module provides predefined constants like ascii_lowercase and ...

Read More

Python – Product of squares in list

Pranavnath
Pranavnath
Updated on 27-Mar-2026 261 Views

The product of squares in a list means calculating the square of each element first, then multiplying all the squared values together. Python provides multiple approaches to solve this problem efficiently. Understanding the Problem Given a list like [9, -4, 8, -1], we need to ? Square each element: 9² = 81, (-4)² = 16, 8² = 64, (-1)² = 1 Multiply all squares: 81 × 16 × 64 × 1 = 82944 Method 1: Using Iteration Iterate through each element, square it, and multiply with the running product ? # ...

Read More

Python – Product of prefix in list

Pranavnath
Pranavnath
Updated on 27-Mar-2026 401 Views

Finding the product of prefix in a list means calculating cumulative products where each position contains the product of all elements from the start up to that position. Python offers several approaches to accomplish this task efficiently. What is Product of Prefix? Given a list, the product of prefix transforms it so that each element becomes the product of all preceding elements including itself. For example: Original List [5, 6, 7, 8] Product of Prefix [5, 30, 210, 1680] The calculation works as follows: Position 0: 5 = ...

Read More

Python – Prefix sum Subarray till False value

Pranavnath
Pranavnath
Updated on 27-Mar-2026 201 Views

In Python, a prefix sum subarray till false value means computing cumulative sums of elements until encountering a "falsy" value (like 0, False, None, empty list, etc.). This technique is useful for conditional cumulative calculations where processing should stop at certain conditions. Understanding Prefix Sum with False Values Consider an array where we want to calculate prefix sums but stop when we encounter a false value ? Index 0 1 2 3 4 5 6 Value 2 10 4 3 0 10 -2 Prefix Sum 2 12 16 19 Stop - ...

Read More
Showing 321–330 of 8,549 articles
« Prev 1 31 32 33 34 35 855 Next »
Advertisements