Iterative Deepening Depth-First Search (DFS) Algorithm in Python

What is an Iterative Deepening Depth-First Search Algorithm? Continuing our story even further, after introducing graphs and basic graph traversal algorithms, we will refine the Depth-First Search Algorithm by introducing the iterative depth limitation. An iterative deepening depth-search algorithm also traverses a graph by exploring it vertex-by-vertex, but it does it by following the vertical … Read more

C贸mo convertir una lista de cadenas en una lista de n煤meros en coma flotante (flotantes) en Python

La forma m谩s pit贸nica de convertir una lista de cadenas en una lista de flotantes es usar una comprensi贸n de listas floats = [float(x) for x in strings]. Recorre todos los elementos de la lista y convierte cada elemento de la lista x en un flotante utilizando la funci贸n incorporada float(x). Este art铆culo muestra las … Read more

Python Depth-First Search (DFS) Algorithm

What is a Depth-First Search (DFS) Algorithm? Building on our previous story about graphs and graph traversal algorithms, this time we will look into a depth-first search algorithm. A depth-search algorithm also traverses a graph by exploring it vertex-by-vertex, but it does it by following the vertical order of the vertices. Although the depth-first search … Read more

Python math.factorial()

The Python installation comes with its own library of functions. The factorial function math.factorial() is included with its math module. Math modules are part of the Python install code package. Math modules or functions such as factorial, square root, sine, and exponential may be used in Python programs. To use them, the import command must … Read more

Bollinger Bands Algorithm 鈥 Python Binance API for Crypto Trading

A Bollinger Band consists of three lines: a simple moving average, an upper band, and a lower band. The assumption is that if the real price crosses over one of the bands, this can be seen as a signal to trade in or our of a given asset. For cryptocurrencies, breakout trades are more frequently … Read more

Moving Average Convergence Divergence (MACD) 鈥 Python Binance API for Crypto Trading

MACD is a trend-following momentum indicator used for trading. It consists of two lines: The MACD line is calculated by taking the difference between short-term EMA and long-term EMA. Exponential Moving Average (EMA) assigns weights to all the values due to a given factor whereas the latest data point gets the maximum weight, and the … Read more