Free course

Python: Free Online Learning for Beginners

Learning to program is a difficult and time-consuming process. Learning language syntax is the easiest and shortest part of the journey, but that doesn't mean that it's unimportant, it's where you've got to start. This course is about the basics of writing programs in Python. It gives you a springboard so that you can start writing meaningful programs

18 hours139040 students72 lessons with practice in the browser
Start LearningSign Up

Python Basics

Python is a popular and promising language. It is often chosen as the first language to learn programming. We will learn Python from scratch, from the very basics. The first module is a springboard to writing meaningful programs. In it, we'll figure out how to give a computer a command in Python. We'll tell you what comments are and what they're for. On the example of checking your decisions on the site we'll consider what testing is and how to read test output. We'll explain why you shouldn't break grammar rules of the programming language.

Arithmetic in Python

Today's programs are created to serve businesses, help with daily life, and entertain. But they are still based on computation. The simplest and most basic subject in programming is arithmetic. In this module we will translate arithmetic operations into programming language, master the basic terminology - for example, how an operator differs from an operand. We will talk about the priority of operations. And at the end we will tell you what a linter is and why it can "swear".

Strings

Text in programming is called "strings," and this topic is not as simple as it may seem. How do you output a phrase that has both single and double quotes? What is an escape sequence? The module focuses on different aspects of writing text - we'll experiment with the output of different strings and talk about encoding.

Variables

Information can be put into special "repositories" and then used as many times as you like. These storages are called variables, and they help simplify code and reduce unnecessary repetition.

Deeper About Lines

Continuing to study strings and their relationship to variables. We'll take a look at interpolation, character extraction, slice, and more.

Data types

Python is a language with strong typing and immutable primitive data types. What happens when we try to multiply a number by a string? How does Python know what type of data is in front of it? What is type conversion? You will find the answers to these questions in the current module.
Let's get started

Calling functions

There is a concept of "function" to express any arbitrary operation in programming. Functions are the building blocks from which programmers build systems. In this module we will learn how to use the functions we have already created. We will look at the function signatures in the documentation and figure out how to use them. We will learn about the standard libraries that hold thousands of functions. It is impossible to learn all the functions, but every programmer should know where to find the documentation about them.

Properties and methods

The data we use in our programs can have important attributes. In Python, attributes are built right into the language. In addition to static properties, data also have methods - functions inside of properties. Properties and methods are just like expressions, like variables or function calls, which means they can be combined in all sorts of ways. These topics are covered in greater depth in separate courses about the object-oriented features of Python. In this module, we will cover the basics.

Definition of functions

Defining your own functions makes writing and maintaining programs much easier. For example, being able to define functions allows you to combine complex (compound) operations into one - all the complexity can be hidden behind one simple function. Learning how to write functions is the first step towards truly useful programs. And we'll help you with that. In this module, you'll create your first function and learn how to give it a name that any developer will understand.

Logic

Logical expressions allow you to answer questions that arise while the program is running. Is the user authenticated? Is the subscription paid for? Is it a leap year? In this module, we will study functions-predicates - those that ask a question and answer it - true or false. We will practice writing such functions and move on to more complex logical expressions.

Conditionals

The job of predicate functions is to get the answer to a question. However, this usually isn't enough; you often need to perform a certain action depending on the answer. If and if-else are Python constructions that allow programmers to choose the desired behavior of the program depending on different conditions, often skipping some instructions and executing others. We'll analyse them in practice in this module.

Loops

Any code can be repeated dozens, thousands, millions of times. When we combine loops with the other tools we know, variables and conditions, it opens up many possibilities for building programs and complex systems. Here's a simple example. You need to find a specific phrase in a 500-page textbook. You remember the phrase, but not the page number. The easiest (and longest) way is to browse through the pages one by one until you find the right one. Loops are needed to perform these repetitive actions.
Are you ready?
Registration is not required

JavaScript icon
18 hours110334
CSS icon
9 hours47517
PHP icon
18 hours31761
HTML icon
10 hours89844