Programming Articles

Page 148 of 2547

How to Get the Sign of an Integer in Python?

Swarnava Bhattacharyya
Swarnava Bhattacharyya
Updated on 27-Mar-2026 16K+ Views

In Python, determining the sign of an integer means finding whether a number is positive (+1), negative (-1), or zero (0). Python offers several approaches to accomplish this task, from simple comparisons to built-in functions. Using Mathematical Comparison with Zero The most straightforward approach uses conditional statements to compare the number with zero − def get_sign(number): if number > 0: return 1 elif number < 0: return -1 ...

Read More

How does a Python interpreter work?

Swarnava Bhattacharyya
Swarnava Bhattacharyya
Updated on 27-Mar-2026 7K+ Views

The Python interpreter works as a computer converter that translates high-level Python code to low-level machine language. Python codes are executed by an interpreter called CPython, which is written in C language and processes instructions line by line. How Python Interpreter Works The Python interpreter follows a systematic approach to execute your code through these essential steps: Lexing − Breaking code into tokens Parsing − Creating Abstract Syntax Tree (AST) Compilation − Generating bytecode Execution − Converting to machine code via PVM Output − Returning results or error messages ...

Read More

How can we update a large Python 2 codebase to Python 3?

Swarnava Bhattacharyya
Swarnava Bhattacharyya
Updated on 27-Mar-2026 308 Views

Python 2 reached end-of-life in 2020, making migration to Python 3 essential for maintaining secure, supported applications. Python 3 offers significant improvements including better performance, enhanced security, and modern language features. Why Migrate to Python 3? Python 3 provides several advantages over Python 2: Active Support − Python 2 is no longer maintained or updated Performance − Python 3 is generally faster and more memory efficient Modern Features − Better Unicode support, type hints, and async programming Security − Regular security updates and patches Migration Strategies There are two main approaches for migrating ...

Read More

Multilingual Google Meet Summarizer and Python Project

Mithilesh Pradhan
Mithilesh Pradhan
Updated on 27-Mar-2026 619 Views

A Multilingual Google Meet Summarizer is a Chrome extension that automatically transcribes and summarizes Google Meet conversations in multiple languages. This tool became especially valuable during remote work periods when effective meeting documentation was crucial for productivity. In this article, we'll explore the project architecture and examine key implementation details using Python for natural language processing and summarization. Project Overview This Chrome extension captures audio from Google Meet sessions, generates transcriptions, and creates summarized versions in various languages. The system combines web technologies with machine learning for intelligent text processing. Technology Stack Frontend − ...

Read More

Implementation of Teaching Learning Based Optimization

Mithilesh Pradhan
Mithilesh Pradhan
Updated on 27-Mar-2026 810 Views

Teaching Learning Based Optimization (TLBO) is a population-based metaheuristic algorithm inspired by the teaching-learning process in a classroom. The algorithm mimics the interaction between a teacher and students, where knowledge is transferred through teaching and peer learning phases. What is TLBO? TLBO considers a population (class) with learners who gain knowledge through two distinct phases: Teaching Phase − The teacher shares knowledge with all learners Learning Phase − Learners interact among themselves to improve their knowledge Each learner represents a potential solution, and their "knowledge" corresponds to the fitness value of the optimization problem. ...

Read More

Commands to Get Min, Max, Median, and Mean of a Dataset

Satish Kumar
Satish Kumar
Updated on 27-Mar-2026 2K+ Views

When working with datasets, it's important to understand the characteristics of data. One of the most fundamental aspects of a dataset is its central tendency − the point around which data tends to cluster. This can be quantified in a number of ways, including minimum, maximum, median, and mean. In this article, we'll explore these different measures of central tendency and show you how to calculate them using Python's built-in functions and the statistics module. What is Minimum of a Dataset? The minimum of a dataset is the smallest value in the set. This value is useful ...

Read More

Modelling the Secant Method in Python

Dr Pankaj Dumka
Dr Pankaj Dumka
Updated on 27-Mar-2026 4K+ Views

The Secant method is a powerful numerical technique for finding roots (x-intercepts) of polynomial or transcendental functions. Unlike the Newton-Raphson method, it doesn't require derivatives, making it more practical for complex functions. How the Secant Method Works The method starts by selecting two initial points (x₁, x₂) near the expected root. A secant line connects the corresponding points on the function curve. Where this line intersects the x-axis gives us the next approximation x₃ ? ...

Read More

Modelling the Regula Falsi Method in Python

Dr Pankaj Dumka
Dr Pankaj Dumka
Updated on 27-Mar-2026 2K+ Views

The Regula Falsi Method, also known as the "False Position Method", is a numerical technique for finding roots of equations. It uses linear interpolation between two points that bracket the root to iteratively converge to the solution. ...

Read More

Modelling the Newton Raphson Method in Python

Dr Pankaj Dumka
Dr Pankaj Dumka
Updated on 27-Mar-2026 3K+ Views

In this tutorial, we will explore how to find roots of polynomial or transcendental equations using the Newton-Raphson method. This is an iterative numerical method that starts with an initial guess and converges to the root through successive approximations. x_g, f(x_g) x_n Newton-Raphson Method x f(x) ...

Read More

Modelling the Projectile Motion using Python

Dr Pankaj Dumka
Dr Pankaj Dumka
Updated on 27-Mar-2026 11K+ Views

Projectile motion is the motion of an object thrown into the air under the influence of gravity. Python provides excellent tools for modeling and visualizing this physics concept using mathematical equations and plotting libraries. ...

Read More
Showing 1471–1480 of 25,466 articles
« Prev 1 146 147 148 149 150 2547 Next »
Advertisements