Python Networking with Sockets

Have you ever wondered what happens in the system when you type https://app.finxter.com/ or https://google.com and press enter in your web browser? This is exactly what we will be covering in Python Networking. How the data flows from HTTP protocol to TCP/IP protocol stack. Then finally over the internet to fetch the data you requested. We discuss … Read more

How to Display a 1D and 2D Multiplication Table in Python?

Python Multiplication Table For Loop To calculate the multiplication table for a given number, iterate over all values i=0, 1, …, limit in a for loop and use the following statement as a loop body: print(number, ‘x’, i, ‘=’, number * i). This prints all equations, line by line, in the form i x j … Read more

Division in Python

The double-frontslash // operator performs integer division and the single-frontslash / operator performs float division. An example for integer division is 40//11 = 3. An example for float division is 40/11 = 3.6363636363636362. A crucial lesson you need to master as a programmer is “division in Python”. What does it mean to divide in Python? … Read more

A RegEx to Match Bitcoin Addresses

What regular expressions can be used to match Bitcoin addresses? A regular expression for validating Bitcoin addresses must check that the string is 26-35 characters long, start with “1” or “3” or “bc1” consists of uppercase or lowercase alphabetic and numeric characters, and ensure it doesn’t contain ambiguous characters. Not allowed are the uppercase letter … Read more

Python Multiplication Operator

Python’s multiplication operator * multiplies two objects. The semantics of the multiplication depends on the operands’ data types. For example, multiplying two integers performs arithmetic multiplication whereas multiplying a list with an integer performs list concatenation. The specific return value of the multiplication operator is defined in a data types’ __mul__() magic method. Have a … Read more

The $31,000,000 Bitcoin Valuation Thesis

In this article, I’ll develop a simple model of how to value Bitcoin. Valuation Thesis Bitcoin will replace the SWIFT bank-to-bank settlement protocol. Valuation Methodology Bitcoin is now the largest, most decentralized, and most secure international monetary network in the world. This makes it a perfect candidate for bank-to-bank settlements of high-value transactions (whitepaper). Currently, … Read more

Five Types of Inheritance in Python

In a previous article, we introduced the topic of object-oriented programming, or OOP for short. Then, we discussed classes and the topic of inheritance. This article will do a quick recap of inheritance, what it is, and why you’d use it. Then we’ll introduce the different types of inheritance you might encounter in your programming … Read more

Python Subtraction Operator

Python provides the subtraction operator – to subtract one object from another. The semantics of the subtraction depends on the operands’ data types. For example, subtracting two integers performs the arithmetic difference operation whereas subtracting two sets performs the set difference operation. The specific return value of the minus operator is defined in a data … Read more