/k0nzeProgamming, Computer Science, and Everything in Between 2022-03-15T15:37:22+01:00 k0nze / Konstantin Lübeck / Jekyll © 2022 k0nze / Konstantin Lübeck /assets/img/favicons/favicon.ico /assets/img/favicons/favicon-96x96.png Python @staticmethod vs @classmethod2022-03-15T14:00:01+01:00 2022-03-15T15:37:14+01:00 /posts/python-staticmethod-vs-classmethod/ k0nze Python Functions are First-class Objects In Python functions are first-class objects which means that functions can be assigned to variables or passed as an argument for another function in the same manner as primitive data types and objects. For example, in the following code, the function operator has three parameters operation, x, and y. While x and y can be primitive data types, operati... What is Python __name__ == '__main__'?2022-03-08T14:00:00+01:00 2022-03-09T07:47:01+01:00 /posts/python-name-main/ k0nze You might have seen the Python line if __name__ == "__main__": in several code examples and wonder what does it do? Many other programming languages such as Java or C/C++ require a main function as the starting point for an application. However, in Python you can type some lines of code in a file, and the code is executed just fine without the need for a main. So why is there a need for addin... Big O Notation Explained2022-02-23T18:45:00+01:00 2022-03-01T21:02:24+01:00 /posts/big-o-notation/ k0nze Why is Big O Notation Used? When you got different algorithms to solve the same problem, you need to compare those to each other to pick the best (meaning fastest) for your program. Looking at each algorithm’s (pseudo-) code will give you an insight into how they work and what data structures they rely on. However, that doesn’t tell you how long you have to wait until the algorithm finishes an... Python Course #18: Your First Sorting Algorithm (Insertion Sort Explained)2022-02-09T09:00:00+01:00 2022-03-01T21:02:24+01:00 /posts/python-insertion-sort/ k0nze With the knowledge of Python functions and algorithms, we are ready to write our first sorting algorithm and also take a closer look at how fast it runs. What is a Sorting Algorithm A sorting algorithm’s purpose is to reorder a list of elements based on a comparison criterion. This criterion is usually a less than operator < applied to the values of two numbers. However, you can use any ... Python Course #17: What is an Algorithm2022-02-07T14:00:00+01:00 2022-03-01T21:02:24+01:00 /posts/what-is-an-algorithm/ k0nze You probably hear the term algorithm a couple of times a week. YouTubers especially like to praise or blame “the algorithm” for their success or failure. In this article, I want to go a little more in-depth and explain what an algorithm is and what it can do for you. From a very abstract point of view, an algorithm is a well-defined computational procedure that describes the necessary steps ...