
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
In this lecture we’ll talk about the course. We’ll see how to use it and what topics it covers.
In this lecture we’ll be talking about the programming language Python. We’ll be talking about its origin, its features, the Zen of Python, which is a set of rules that it’s advisable to follow and the PEP8 guidelines.
In this lecture we’ll be talking about what we need to start writing Python programs. We’ll install Python itself and an IDE.
In this lecture we’ll see how to use Python in the Python Interactive Shell, in the interactive window in your IDE and in a file. We’ll also see how to use Python as a calculator.
In this lecture we’ll talk about text output. We’ll learn how to echo strings and how to use the print() function.
In this lecture we’ll talk about user input. We’ll learn how to use the input() function to get input from the user which can be then used by the program.
In this lecture we’ll talk about variables. We’ll see how they are assigned values and how they hold references to data. We’ll also see how to assign multiple variables in one go and how to delete references to objects. Finally, we’ll talk about the id() function used to check the identity of variables.
In this lecture we’ll talk about the naming rules. In Python everything’s an object: variables, functions, modules, and so on. We refer to objects by name, but it can’t be any name. In this lecture we’ll learn what rules must be followed when choosing names for our objects.
In this lecture we’ll talk about the basic syntax of Python. We’ll talk about statements, among which we have expressions and assinments.
In this lecture we’ll talk about the comments. Comments are often used to add some additional information to our code or to deactivate a piece of code. They make the code more readable but are ignored by the interpreter.
In this lecture we’ll talk about conditional statements which are used if there is more than one way of executing our program depending on a condition.
In this lecture we’ll talk about loops. There are two types of loops in Python. Loops are used if we want a piece of code to be executed multiple times.
In this lecture we’ll have a first look at the built-in data types available in Python and at the basic operators.
In this lecture we’ll talk about the built-in numeric types in Python. We’ll have a look at integers and floating-point numbers.
In this lecture we’ll talk about the arithmetic operators used in Python. In particular, we’ll discuss the basic operators used for addition, subtracion and multiplication, the two operators used for true and floor division, the exponentiation operator and the modulus operator.
In this lecture we’ll talk discuss some of the basic built-in mathematical functions. In particular, we’ll cover the functions abs, max, min and round.
In this lecture we’ll recapitulate on the basic assignment operator and then we’ll talk about the augmented assignment statements. They are used if we want to perform an operation on a variable and then assign the result back to that variable.
In this lecture we’ll learn how to generate random numbers. We’ll import the functions from the random module and use them to generate random integer and floating-point numbers.
In this lecture we’ll talk about the basics of strings. We already know what strings are – they represent texts of any lenth, even single characters. We’ll learn how to use the quotes with strings, how to index strings, how to compare them and check whether a given substring is contained in a string. We’ll also talk about what it means that strings are immutable.
In this lecture we’ll be talking about some basics operations that are frequently performed on strings. In particular, we’ll be talking about slicing, concatenation and repetition.
In this lecture we’ll be talking about escape sequences that are used for inserting newlines, tabs or single backslashes, among others. We’ll also see how to use raw strings to ignore the escape sequences.
In this lecture we’ll learn two methods of formatting strings: the format method and f-strings. Although they are not the only ones, they are definitely the two preferable ones.
In this lecture we’ll learn some of the most used string methods. The methods we’re going to learn are used to turn strings to all uppercase or lowercase, to return the length of a string or the number of occurrences of a substring, to find the index of a substring, to join the elements of a string, to split strings and to replace substrings with other substrings. We’ll also learn two methods used to check whether a string starts or ends with a specific substring.
In this lecture we’ll be talking about lists in general. We’ll see what lists can contain and how to access their elements. Unlike strings, lists are mutable, so we can change their particular elements in place. We’ll see how to do that. We’ll also learn how to check whether a given item is contained in a list.
In this lecture we’ll learn how to perform operations on lists. We’ll learn how to add elements to a list, how to extend lists, insert elements at arbitrary positions and remove elements from a list. We’ll also see how slicing, concatenation and repetition work with lists.
In this lecture we’ll be talking about some of the most popular list methods. We’ll learn how to sort list, how to reverse them, how to find the index of an element, how to check the length of a list and also how to count how many times an element occurs in a list.
In this lecture we’ll learn how to copy a list. One way to do it is to use the slice operator with just a colon. Another way is to use the copy function. In this lecture we’ll also talk about the difference between a shallow copy and a deep copy and we’ll learn how to make a shallow and a deep copy of a list.
In this lecture we’ll talk about tuples. We’ll see how they compare to lists and when it’s advisable to use them rather than lists.
In this lecture we’ll see how the basic sequence operations like slicing, concatenation and repetition work on tuples. We’ll also see how to delete a tuple.
In this lecture we’ll introduce ranges. We’ll see how to create them and how to create subranges using slicing.
In this lecture we’ll learn how to define dictionaries, how to access their elements and how to perform some basic operations on them. Unlike strings, lists and tuples, dictionaries are not sequences. As of now they are the only representative of built-in mappings available in Python.
In this lecture we’ll get familiar with the most important dictionary methods. We’ll learn how to use them to access elements, how to copy and merge dictionaries and how to remove their contents.
In this lecture we’ll learn another data type, the set. We’ll see how to define sets and when to use them. We’ll also see how to turn lists and strings into sets using the set function.
In this lecture we’ll discuss the most important set methods. We’ll learn how to add and remove elements from a set and how to copy a set.
In this lecture we’ll talk about set operations, which are very much like the ones used in mathematics. We’ll learn how to find a difference of sets, how to make a union of sets and how to find the intersection of sets.
In this lecture we’ll talk about the boolean type. We’ll see how to use it in conditions. We’ll also see how numbers can be used as booleans.
In this lecture we’ll learn how to use the logical operators AND, OR and NOT.
In this lecture we’ll talk about the two identity operators, is and is not. They are used to check whether two variables reference the same object or two individual objects and also to check whether an object is of a given type.
In this lecture we’ll learn how to convert types to other types. In particular we’ll learn how to convert strings to integers or floats and vice versa, how to convert any sequence to a list or tuple and how to convert dictionaries to strings and lists.
In this lecture we’ll talk about operators precedence. Some operators are used before others while evaluating an expression and we’ll talk just about this. We’ll also discuss operator associativity, so what happens if two or more operators are at the same level of precedence. We’ll mention the nonassociative operators as well.
In this lecture we’ll we’ll talk about the work flow of a program in general and about conditional statements in particular. We’ll also learn how to refactor our code so that it’s simpler and more maintanable.
In this lecture we’ll we’ll learn how to simplify conditional statements by means of the ternary if statement.
In this lecture we’ll learn how to iterate over ranges and dictionaries. We iterate over ranges when we want the loop to be executed a fixed number of times. As far as dictionaries are concerned, we’ll learn how to iterate over just the keys, over just the values and over both keys and values. We’ll also talk about nested loops.
In this lecture we’ll talk about the break and continue statements. The former is used to stop the loop completely and go on with execution to the next line of code after the loop. The latter is used to stop just the current iteration of the loop and move on to the next iteration.
In this lecture we’ll be talking about list comprehensions, which are a powerful tool. They are used to create lists in a comfortable way.
In this lecture we’ll learn what functions are and why we should use them.
In this lecture we’ll see how to define functions with parameters. We’ll see how to call such functions and pass arguments to them that correspond to the parameters. We’ll start with a simple function that takes just one parameter, but, as we’ll discover soon, a function can take any number of parmeters.
In this lecture we’ll be talking about functions that return a value which can later be used in expressions. To this end we’ll need the return statement. We’ll see how the results returned from functions can be assigned to variables, how to return complex data types and how to use multiple return statements inside a function.
In this lecture we’ll be talking about optional parameters. We’ll see how to use them along with manadatory parameters.
In this lecture we’ll see how to use keyword arguments. They come in handy for example if there are multiple optional parameters and we usually only need some of them in our function call. Keyword arguments allow us to use only the ones we need and in any order.
In this lecture we’ll see how to define functions that can take an arbitrary number of parameters.
In this lecture we’ll be talking about nested functions. Nested functions are functions embedded in other functions and available only there.
In this lecture we’ll be talking about scope. Scope is the part of your program where a variable is available. We’ll discuss global and local scope.
In this lecture we’ll learn why Python functions are known as first-class functions. We’ll learn that functions can be assigned to variables, passed as arguments to other functions and returned from other functions. In this lecture we’ll focus on the first feature: we’ll see how functions can be assigned to variables.
In this lecture we’ll learn how functions can be passed as arguments to other functions.
In this lecture we’ll be talking about functions that return other functions.
In this lecture we’ll learn how to use anonymous functions with the lambda operator.
In this lecture we’ll introduce the world of object oriented programming. We’ll learn the basic terminology and we’ll talk about the three major principles object oriented programming is based on: encapsulation, inheritance and polymorphism.
In this lecture we’ll discuss classes and objects and how the two relate to each other. We’ll learn how to define classes and how to instantiate them.
In this lecture we’ll be talking about attributes. We’ll see how instance attributes and class attributes are used.
In this lecture we’ll bbe talking about constructors. As a matter of fact, we don’t use explicit constructors in Python, but the __init__ method plays their role. We’ll se how to instantiate objects and initialize them at the same time.
In this lecture we’ll discuss methods. We’ll see how to define them inside the class and how to call them on objects.
In this lecture we’ll learn why encapsulation, one of the major principles of object oriented programming, is so important.
In this lecture we’ll be talking about public, private and protected attributes. We’ll postpone more detailed discussion of protected attributes for when we cover inheritance, because they are used in subclasses.
In this lecture we’ll be talking about etter and setter methods in more detail. This time we’ll be using them with private attributes.
In this lecture we’ll be talking about properties, which are, besides the getter and setter methods, a convenient way of accessing attributes from outside the class. We’ll see a couple of ways we can create properties.
In this lecture we’ll be talking about magic methods, and in particular about the __str__ method which is used to define an object’s string representation.
In this lecture we’ll talk about polymorphism. Python is implicitly polymorphic. We’ll also discuss the most important magic methods used to overload operators.
In this lecture we’ll talk about inheritance. We’ll see how classes inherit attributes and methods from other classes.
In this lecture we’ll continue our discussion on inheritance. We’ll learn how to make different versions of methods for each of the classes that we can find in the inheritance hierarchy if such a varied behavior is needed. This is what we call method overriding.
In this lecture wel’ll be talking about modules in general. We’ll learn what they are, how to import whole modules or just single functions from a module and how to use aliases.
In this lecture wel’ll learn how to create our own modules and how to import them to our files.
In this lecture wel’ll learn that modules can generally be imported only once. But sometimes we need to re-import them, especially if they have been modified. We’ll learn how to do it using the reload function from the importlib module.
In this lecture we’ll talk about files in general and we’ll learn how to read data from a file.
In this lecture we’ll learn how to write to file and how to append to file. In the former case a new file is created each you open the file for writing, and in the latter case, text is appended at the end of the file.
In this lecture we’ll be talking about context managers. They are often used to work on files and take care of closing the files when done. Context managers make use of the with statement.
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. The language is rapidly gaining popularity, not only because it’s relatively easy to learn, but also because you can do almost everything with it. Python is used for scientific and economic simulations, desktop apps, web apps, data mining, machine learning, games, 3D modelling, even making music, and many, many more. Python is used in almost every domain you can think of: mathematics, physics, atronomy, chemistry, biology, geography, arts, music, economy, robotics. Actually you could find an application for it everywhere.
As you can see, Python is a valuable skill to have, maybe it even will become your profession and passion. Well, this course will let you start this adventure. If you are a beginner, this course is right for you.
Discover The Fascinating World of Python Programming:
· Input and output
· Variables
· Statements
· Conditional code
· Loops
· Numeric types
· Operators
· Strings
· Lists , tuples, ranges
· Dictionaries
· Sets
· Booleans
· Data type conversions
· Flow control
· List comprehensions
· Functions
· Scope
· Lambda Expressions
· Object Oriented Programming
· Modules
· Files
· Exceptions
· ... and much more
Don’t Wait Any Longer. Don’t Be Afraid Any Longer. Go For It. Fall in Love with Python.
Python seems to be everywhere. And if it’s not somewhere yet, it soon will. Python is taught in schools, Python is used by world-wide known companies, Python is used to make websites, many of which most of us use on a regular basis. Python can help us solve complex everyday problems in less time and with less code than many other languages. Python is interpreted, so you can see your results right away. And Python code is very orderly and readable.
Contents and Overview
This course is targeted at beginner students who have never learned to program or have some background in other programming languages. Each lecture is brief and concise, focused on one topic. Most lectures consist of two parts. The first part is a brief introductory video with some examples. The second part is a project for you to do. It’s based on the material covered in the video and is supposed to solve a simple practical problem. There are 80 lectures and 70 projects. It’s quite a lot. I can tell you, don’t skip any. Take your time to do all the projects and this will really skyrocket your practical skills.
If you have difficulty doing the project, you can find lots of guidelines and hints and also the full code. Don’t get discouraged if something doesn’t work straight away. It’s normal when you learn programming. A single unmatched parenthesis or too small an indent may cause the program to not run. But this is part of programming. With practice you’ll write code more and more smoothly.
This course is divided into 11 sections, each of them covering a broader topic subdivided into lectures. The pace is up to you, you can go through the easier parts faster and then take more time to study the more complicated ones.
After you finish each section, there’s a quiz for you that covers the material discussed in that section.
After you finish this course you will be able to move around the fascinating world of Python and apply your knowledge to practical everyday problems. You will be able to use quite a lot of tools and techniques. This will make a good starting point for more advanced study.