Python Articles

Page 29 of 855

Network Analysis in Python

Pranay Arora
Pranay Arora
Updated on 27-Mar-2026 951 Views

A network is a collection of nodes and edges that represent the relationships or connections between those nodes. The nodes can represent various entities, such as individuals, organizations, genes, or websites, while the edges represent the connections or interactions between them. Network analysis is the study of the relationships between these entities represented as a network. It involves the use of mathematical, statistical and computational techniques to provide insights into the behavior of complex systems and help make informed decisions in various domains. Python offers us a package called NetworkX which is of great help for creation, manipulation, ...

Read More

Introduction to Financial Concepts using Python

Pranay Arora
Pranay Arora
Updated on 27-Mar-2026 346 Views

Python provides powerful tools and libraries for implementing financial concepts and calculations. From basic time value of money calculations to complex portfolio optimization, Python simplifies financial analysis through libraries like NumPy, pandas, SciPy, and matplotlib. Key financial concepts that can be implemented using Python include: TVM (Time Value of Money) − Calculates how money's value changes over time due to inflation and interest rates. Interest Calculations − Computes simple interest, compound interest, and continuous compounding. Portfolio Optimization − Selects investment combinations to maximize returns while minimizing risk. Monte Carlo Simulation − Models financial system behavior using statistical ...

Read More

Foundations of Probability in Python

Pranay Arora
Pranay Arora
Updated on 27-Mar-2026 2K+ Views

Probability deals with the study of random events and their outcomes. It is an essential concept in various fields like finance, physics, engineering and data science. It is defined as the likelihood of an event occurring − no event can be predicted with 100% certainty. In this article, we are going to explore the foundations of probability in Python using built−in libraries for statistical computations and random number generation. The basic concepts and keywords of probability that are needed before we get started with Python are ? Sample space − A set of all ...

Read More

Forecasting Using ARIMA Models in Python

Pranay Arora
Pranay Arora
Updated on 27-Mar-2026 1K+ Views

ARIMA is a statistical model used for time series forecasting that combines three components: autoregression (AR), integration (I), and moving average (MA). Autoregression (AR) − This component models the dependence between an observation and a number of lagged observations. It's based on the idea that past values of a time series can be used to predict future values. The order of autoregression, denoted by "p", specifies the number of lagged observations to use as predictors. Integration (I) − This component handles non-stationarity of the time series data by removing trends and seasonality. The order of integration, denoted by ...

Read More

Random Replacement of words using Python

Nilesh Kumar
Nilesh Kumar
Updated on 27-Mar-2026 456 Views

Random word replacement is a text manipulation technique where we randomly select a word from input text and replace it with a randomly chosen word from a predefined list. This process introduces variation and generates different text versions, useful for content generation, testing, and creative writing. Python provides excellent tools for implementing random word replacement through the random module, which helps generate random indices for selecting words from text and replacement lists. Syntax The key functions used for random word replacement are ? random.randint(start, stop) Returns a random integer from the specified range. ...

Read More

Python - Product and Inter Summation dictionary values

Nilesh Kumar
Nilesh Kumar
Updated on 27-Mar-2026 277 Views

In Python, dictionaries store key-value pairs where we can perform mathematical operations on the values. This article demonstrates how to calculate the sum and product of dictionary values using the values() method and loops. Syntax The primary method used is ? dictionary.values() The values() method returns a view object containing all dictionary values. It takes no arguments and allows iteration through values without accessing keys. Sum of Dictionary Values To calculate the sum, we initialize a variable to 0 and add each dictionary value ? def calculate_sum(dictionary): ...

Read More

How to Print the Last Word in a sentence using Python?

Nilesh Kumar
Nilesh Kumar
Updated on 27-Mar-2026 1K+ Views

Extracting the last word from a sentence is a common text processing task in Python. This can be accomplished using the split() method to break the sentence into words and accessing the last element. Using split() Method The split() method divides a string into a list of words, making it easy to access the last word using negative indexing. Syntax string.split(separator, maxsplit) Parameters: separator − Optional. Specifies the delimiter (default is whitespace) maxsplit − Optional. Maximum number of splits (default is -1 for all occurrences) Example def print_last_word(sentence): ...

Read More

Building Chatbots in Python

Pranay Arora
Pranay Arora
Updated on 27-Mar-2026 715 Views

A chatbot is a computer program designed to simulate conversations with human users via text or voice. It uses AI and NLP techniques to understand and interpret user messages and provide relevant responses. In this article, we will see how to create chatbots using Python. Chatbots like ChatGPT have become popular since the end of 2022 and have wide-scale use cases across different fields. They are integrated with mobile apps like Swiggy and Zomato to provide faster resolution to customer complaints. Types of Chatbots Rule-based chatbots − They respond to user input based ...

Read More

Modelling Two Dimensional Heat Conduction Problem using Python

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

In this tutorial, we will see how to model the 2D heat conduction equation using Python. A 2D, steady-state heat conduction equation with heat generation can be written in Cartesian coordinates as follows − $$\mathrm{abla^{2} T \: + \: \frac{q_{g}}{k} \: = \: \frac{\partial^{2}T}{\partial x^{2}} \: + \: \frac{\partial^{2}T}{\partial y^{2}} \: + \: \frac{q_{g}}{k} \: = \: 0 \:\:\dotso\dotso (1)}$$ This equation must be discretized to obtain a finite difference equation. Let us consider a rectangular grid as shown below. ...

Read More

Modelling the Taylor Table Method in Python

Dr Pankaj Dumka
Dr Pankaj Dumka
Updated on 27-Mar-2026 540 Views

The Taylor Table method is an efficient technique for deriving finite difference schemes for derivatives using a specific stencil. A stencil is a collection of grid points used to approximate derivatives numerically. Understanding the Taylor Table Method Consider evaluating the second derivative using Taylor series expansions. For points around $x_i$: ...

Read More
Showing 281–290 of 8,549 articles
« Prev 1 27 28 29 30 31 855 Next »
Advertisements