Bitwise and bit-shift operations

As you probably know, in most cases, computer numbers are represented in binary format. In this format, each digit of a number can be represented as either 0 or 1. For example, the decimal value 15 is 1111 in binary format. We’ve already learned how to convert integer numbers to binary and perform some arithmetic operations with binary numbers. Now let’s learn how else you can work with binary numbers!

Switch statement

You already know how to shape the control flow of a program using if-else statements. Perhaps, you have faced situations when you had to stack and nest multiple if-else statements to get the desired result. In this topic, you will learn an alternative way to deal with multiple choices.

Units of information

Throughout life, we always find something to measure: the amount of food we need to cook for the family, the length and width of that couch you want to put in the room, our weight and height. The latter is especially exciting: it’s really cool to learn that in just one year you grew by a full 2 inches!

Multiple constructors

Sometimes we need to initialize all fields of an object when creating it, but there are cases in which it might be appropriate to initialize only one or several fields. Fortunately, for this purpose, a class can have several constructors that assign values to the fields in different ways. In this topic, you will learn how to work with multiple constructors and define the way…

You Should Be Using Python’s Walrus Operator – Here’s Why

The assignment operator – or walrus operator as we all know it – is a feature that’s been in Python for a while now (since 3.8), yet it’s still somewhat controversial and many people have unfounded hate for it. In this article I will try to convince you that the walrus operator really is a good addition to the language and that if you use it properly,…