Analysis of algorithms is an important part of computational complexity theory, which provides a theoretical estimate of the resources required by an algorithm to solve a specific computational problem. Most algorithms are designed to work with inputs of arbitrary length. The analysis of the algorithms consists in determining the quantity of time and space resources necessary for its execution.
Read moreloops are a powerful tools used in various problems, that's why we focus on this course in how to use them in Python. In the other programming languages like C/C++ and Java we found three different kinds of loops, In Python, there are only two ways to execute loops. Although all methods offer similar basic functionality, their syntax and time for checking conditions differ.
Read moreA set is an unordered collection of items. Each element is unique (no duplicates) and must be immutable (which cannot be changed). However, the set itself is mutable. We can add or remove items. If your application doesn't care how the items are stored, use sets rather than lists, because when it comes to handling items, a set is much more efficient than a list.
Read moreThere will be situations where your program has to interact with the user. For example, you want to take input from the user and then display some results. We can do this by using the input() function and the print() function, respectively. The easiest way to produce output is to use the print () function where you can pass zero or more comma-separated expressions.
Read moreA Python dictionary works similarly to a dictionary in a real world. The keys in a dictionary must be unique and of immutable data type, such as strings, integers, and tuples, but the key-values can be repeated and be of any type. Each key corresponds to a value, so we cannot have duplicate keys. Dictionaries are editable objects, which means that we can add, delete, or update items after they are created.
Read moreTuples are sequences that function like lists, the only difference is that they are immutable, which means that we cannot add, delete or modify its elements once created. It also makes them super efficient compared to the list. Tuples are used to store a list of items that do not change.
Read moreLists are like arrays, declared in other programming languages. Lists don't always have to be homogeneous, which makes them an extremely powerful tool in Python. Lists are also very useful for implementing stacks and queues. The lists are modifiable and can therefore be modified even after their creation.
Read moreInheritance is a mechanism that allows us to create a new class - known as the child class - that is based on an existing class - the mother class, adding new attributes and methods in addition to the existing class. When you do this, the child class inherits attributes and methods from the parent class.
Read moreOperator overload allows you to redefine operator meaning based on your class. It was the magic of operator overload that we were able to use the operator + to add two numeric objects, as well as to concatenate two string objects.
Read moreA matrix is a two-dimensional data structure in which numbers are organized in rows and columns. Python has no built-in type for matrices. However, we can treat a list list as a matrix.
Read more