How to set up smartphones and PCs. Informational portal
  • home
  • Programs
  • What is Python? High-level programming language. How Python works

What is Python? High-level programming language. How Python works

Is it worth learning the Python programming language? After all, you can often hear that this language is dying. This question was discussed by users of the Quora website and shared their opinions.

Bill Karwn, SQL Developer, Consultant, Trainer and Author

Assembly language gives you the perfect opportunity to write compact, efficient, and project-optimized code. You can do amazing things in code written in this language, which is only a few kilobytes in size. But the level of efficiency that can be obtained using assembly language does not justify the extra work, the extra time, and the skills it requires.

It is true that languages ​​both gain in popularity and lose it. Productivity is a major challenge in programming, so from time to time new languages ​​are created that increase productivity for at least some kinds of work.

Most programmers today use higher-level languages ​​- they need to be more productive. Top-level languages ​​can be compiled into machine code (C or C ++), or they can be compiled into architecture-independent bytecode and run in a virtual machine (Java) or processed (JavaScript, PHP, Ruby, Python, Perl, etc.).

The misconception that it is necessary to learn assembly language, because "it is better than Python." This is a silly point of view based on outdated data.

Bill Poucher, CEO of ICPC, software for energy, synthetic genetics and more.

Learn Python. Provide yourself with programming experience. This language has its own elegance.

Learn C as a language for Unix machines. Understanding UNIX is relatively straightforward.

Learn MIX to understand Knuth.

Learn Java so that you don't have difficulty working with others, as well as master object-oriented programming.

Learn C ++ so you can program in any style you want. Its strength is that it is the main programming language. His weakness is that you need to understand his style in order to program in it.

Learn LISP to solidify your understanding of recursion.

Did I say that you shouldn't learn at least something? No. Because the only thing that needs to be done is to accustom yourself to constantly learning something, especially learning how to solve the problems that arise.

Shiva Shinde, Python is easy to code but hard to read

The Python programming language is not dying, it is one of the fastest growing languages.

  1. It's easy to learn
  • Currently, 8 of the top 10 American computing programs use this language (Philip Guo, CACM)
  • Python programs usually have a minimum of patterns that are commonly found in other programming languages. Therefore, you can use unconventional problem solutions more often.
  • If you have programming experience, even if not in this language, then you will quickly master Python.

2. Full functionality

  • It is not only a language for statistics. Python has all the capabilities for collecting and cleaning data, for working with databases and high performance computing, and much more.
  • This is a generally accepted programming language with a huge number of built-in libraries. It's good for data and database management as well as networking programming. It is a thoughtful language with a huge amount of resources available.

3. Serious scientific data libraries

  • Python has significant scientific libraries with a huge amount of data to use.
  • The backbone of these scientific libraries is the SciPy Ecosystem, which even hosts its own conferences.
  • Pandas and Matplotlib are both part of SciPy. They provide superior data on a wide variety of topics such as machine learning, text mining, and network analysis.

Hernan Soulages, pragmatic programmer

This language is quite popular, its importance is growing in academic circles. It is also true that the usefulness of a programming language depends on what you want to do in it.

I don't like PHP at all, but I’m not stupid enough to deny its versatility and power, and that the language is easy enough to master.
As for learning assembler, this language directly depends on which processor you are working with.

If you know how to work with one, then you will definitely be able to use it in a processor family for some time. But over time, they also undergo some changes. In this sense, it is the least durable family of languages.

Magnus Lyczka, software developer and consultant in Gothenburg

Many users like Python. For some applications, it will be too slow, and, for example, with assembly language, they will run faster, but also quickly these applications will run in C, while the code written in C will work for all platforms.

Many startups became successful with the Python language, after which they had to rewrite some programs in Java, C ++ or C. And if these startups started working in assembly language, they would most likely have run out of funding long before their the quick but hard-to-read code would be complete.

But when working with assembly language, you have to deal not only with different processor architectures, but also with technical details that differ in different operating systems.

What programs are written in Python?

Application software for normal people

Let's start by going through the programs used by ordinary people who are not IT specialists.

Bittorrent

All versions prior to 6 of this torrent client were written in Python. Version 6 has been rewritten in C ++.

Ubuntu Software Center

Quoting from Wikipedia:
Ubuntu Application Center(eng. Ubuntu Software Center) - Free software for finding, installing and removing packages on Ubuntu Linux system. in the latest versions, it is possible to purchase magazines about Linux and Ubuntu, and you can also purchase paid games and software. The application is developed in Python + Vala using the GTK + libraries and is a graphical shell for the Advanced Packaging Tool.

Blender

Quoting from Wikipedia:
Blender is a free, professional package for creating 3D computer graphics, which includes tools for modeling, animation, rendering, video post-processing, as well as creating interactive games. It is currently the most popular among free 3D editors due to its fast and stable development, which is facilitated by a professional development team.

Python is used as a tool for creating tools and prototypes, logic systems in games, as a tool for importing / exporting files (for example COLLADA), and automating tasks.

Here are some pages of documentation:

Gimp

Quoting from Wikipedia:
Python is used to write additional modules like filters.
Here are some pages that go deeper into the topic:

Games

Civilization IV

Most of the game is written in Python ().

Battlefield 2

On the Internet there are many tutorials and simple recipes for changing various objects and their behavior.

World of tanks

Quote from the article "GUI in the game World of Tanks":
The project uses Python as the scripting language. All the beauty that we made in Flash needs to be connected in the game, filled with data, processed and translated from user input into real actions in the game. This is all done in Python.
A more complete list of games that use Python can be found on Wikipedia and the Python documentation.

Which companies are using Python?

The list of companies using Python is long. Among them are Google, Facebook, Yahoo, NASA, Red Hat , IBM , Instagram, Dropbox, Pinterest, Quora, Yandex, Mail.Ru.

Yandex.

Here, please, is the talk "Python in the Yandex.Disk core". Sergey Ivaschenko (speaker):
I will talk about how we use Python in Yandex.Disk, what libraries and frameworks we use, what tasks we solve and what problems we face. I will also touch on the topic of logging and processing asynchronous operations.
In one of the videos on the Yandex channel, employees talked about their favorite languages.

And in the blog of the Yandex company there is an entry "In what programming languages ​​do they write in Yandex" dated March 19, 2014. So, 13% of Yandex employees write most of their time in Python.

Mail.ru

Mail.ru employees also use Python. The official Mail.ru blog on Habré has several articles about Python:

Google

Google has been heavily involved with Python since its inception. There are rumors that most of YouTube and Google Drive are written in Python. Google has developed the entire Google App Engine cloud platform so that developers can run Python code in the Google cloud. Many developers of the language have worked and still work at Google.

Dropbox

The service is developed in Python. It is no coincidence that the author of the Python language, Guido van Rossum, works at DropBox.

Other companies

The organizations that use Python

Where is Python used?

Web development

In this area, Python is perhaps the most used. The Django web framework continues to gain traction with an army of fans. Many novice programmers even think that Python is not used anywhere else. But many other web frameworks are written in Python: Pylons , TurboGears , CherryPy, Flask, Pyramid and others. A more complete list can be found.
There is also a Django-based CMS called DjangoCMS.
Very often, site parsers are also written in Python. Usually they use Requests, aiohttp, BeautifulSoup, html5lib for this. There are also higher-level website scraping tools: Scrapy, Grab.

System administration

Python is a great language for automating the work of a sysadmin. It is installed by default on all Linux servers. It is simple and straightforward. Python code is easy to read. Some people love Perl, I also love it for its easy work with regular expressions, but I hate Perl for its syntax. Bash is handy for relatively small to medium sized scripts, but Python is more powerful and in some cases allows you to write a lot less code.
The only package I know of is Fabric. Perhaps there is something else, write me in the comments if you know.

Additional Information

Python for system administrators (IBM developerWorks)
Fabric documentation. Systems Administration.

Embedded systems

Very often Python is used for embedded systems programming. The most famous project that uses Python is the Raspberry Pi. But he's not the only one:
Embedded Python
Raspberry Pi
Python Embedded Tools
The Owl Embedded Python System

Application software development, including games

Python is often used as an auxiliary language in the development of application software. I have already given examples above, I will not repeat myself.

Scientific research

Physicists and mathematicians love Python for its simplicity. In addition, there are a huge number of libraries for Python that make life easier for a scientist. For instance:
  1. SciPy is an open source library of high quality scientific tools for the Python programming language. SciPy contains modules for optimization, integration, special functions, signal processing, image processing, genetic algorithms, ordinary differential equations, and other problems commonly found in science and engineering.
  2. Matplotlib- a library in the Python programming language for visualizing data with two-dimensional (2D) graphics (3D graphics are also supported). The resulting images can be used as illustrations in publications.
  3. Numpy is an extension to the Python language that adds support for large multidimensional arrays and matrices, along with a large library of high-level math functions for manipulating these arrays.
A more complete list of libraries for scientific computing in Python can be found on Wikipedia.

Education

Very often, Python is recommended as the first programming language.
Some Russian schools have a successful track record of teaching Python programming to schoolchildren.
By the way, Guido van Rossum was impressed by the ABC language when he wrote Python. And the ABC language was meant for teaching and prototyping.

Criticism of the Python language

Python is one of the slowest programming languages

On the Internet, you can find many different speed tests of programs written in different programming languages. Python is usually found at the end of lists.
Usually by Python they mean CPython, the reference implementation of the language. There are other implementations of the Python language, such as PyPy. PyPy outperforms CPython and many other scripting languages, and is very close to Java in speed. But there is one problem - Python is not fully implemented in PyPy, which is why many Python programs do not work in it.
Many programmers write inserts in C / C ++ to speed up work in bottlenecks. Python is not designed for computational tasks, tasks that require a lot of memory (memory bound) and the like. You need to be able to choose the right tools for the task at hand. Guido van Rossum talks about this in an interview.

GIL interferes with concurrent execution of multiple threads

Global Interpreter Lock prevents multiple Python threads from executing concurrently. These are the features of CPython. But is this a disadvantage? You need to understand that everything depends on the task. If your task depends on the IO bound task, then it is more efficient to use several processes that will work asynchronously with external resources. And threads with shared memory are good for computational tasks (CPU-bound). But even if you need to work with streams, you can turn off the GIL for a while, as it is done in the math package NumPy.

No good distribution tools

Unfortunately, Python code, which has many system library dependencies, is difficult to port to other systems. This task is accomplished with virtualenv. but this tool is very much criticized by system administrators.

Additional Information

Python Success Stories
You Used Python to Write WHAT?
What is Python Used For?
More proof that it "s Python" s world and we "re just living in it
AVERAGE SALARY FOR JOBS REQUIRING PYTHON
List of Python software

The program is a set of algorithms that ensure the execution of the necessary actions. Conventionally, in the same way, you can program an ordinary person by writing precise commands in order, for example, to make tea. If the latter option uses natural speech (Russian, Ukrainian, English, Korean, etc.), then a special programming language will be needed for the computer. Python is one of those. The programming environment will subsequently translate the commands into and the person's purpose for which the algorithm was created will be fulfilled. Python has its own syntax, which will be discussed below.

History of the language

Development began in the 1980s and ended in 1991. The Python language was created by Guido van Rossum. Although the main symbol of "Python" is the snake, it was named after the American comedy show.

When creating the language, the developer used some commands borrowed from existing Pascal, C and C ++. After the first official version went online, a whole group of programmers joined in to refine and improve it.

One of the factors that allowed Python to become quite famous is design. He is recognized as one of the best by many highly successful specialists.

Features of "Python"

The Python programming language for beginners is a great teacher. It has a fairly simple syntax. It will be easy to understand the code, because it does not include many auxiliary elements, and the special structure of the language will teach you how to indent. Of course, a well-designed program with few commands will be immediately understandable.

Many syntax systems have been built around object-oriented programming. Python is no exception. For what exactly was he born? It will facilitate training for beginners, help to remember some of the elements of already qualified employees.

Language syntax

As already mentioned, the code is easy and simple to read. "Python" has sequential commands that are distinguished by the clarity of execution. In principle, the operators used will not seem difficult even for beginners. This is what makes Python different. Its syntax is light and simple.

Traditional operators:

  • When setting a condition, use the if-else construction. If there are too many such lines, you can enter the elif command.
  • Class is for understanding the class.
  • One of the simpler operators is pass. It doesn't do anything, it fits for empty blocks.
  • Loop commands are while and for.
  • Function, method and generator are defined thanks to def.

In addition to single words, the Python programming language allows you to use expressions as operators. By using string chaining, you can reduce the number of individual commands and parentheses. The so-called lazy calculations are also used, that is, those that are performed only when the condition requires it. These include and and or.

The process of writing programs

The interpreter works on a single mechanism: when writing a line (after which "Enter" is placed), it is immediately executed, and a person can already see some result. This is useful and convenient enough for beginners or those who want to test a small piece of code. In compiled environments, you would first have to write the entire program, only then run it and check for errors.

The Python programming language (for beginners, as it has already become clear, it is ideal) in the Linux operating system allows you to work directly in the console itself. You should write the name of the code "Python" in English on the command line. It won't be difficult to create your first program. First of all, it should be borne in mind that you can use the interpreter here as a calculator. Since young and novice specialists are often not friendly with syntax, the algorithm can be written as follows:

After each line it is necessary to put "Enter". The answer will be displayed immediately after clicking it.

Data used by Python

There are several types of data used by computers (and programming languages), and this is quite obvious. Numbers can be fractional, whole, can consist of many digits, or be quite massive because of the fractional part. To make it easier for the interpreter to work with them, and he can understand what he is dealing with, a specific type should be set. Moreover, it is necessary so that the numbers fit into the allotted memory cell.

The most common data types used by the Python programming language are:

  • Integer. We are talking about whole numbers that have both negative and positive values. Zero is also included in this type.
  • In order for the interpreter to understand that it is working with fractional parts, the type should be set to float point. As a rule, it is used in the case of using numbers with a varying point. It should be remembered that when writing a program, you must adhere to the notation "3.25", and not use the comma "3.25".
  • In the case of adding strings, the Python programming language allows you to add the string type. Often, words or phrases are enclosed in single or

Disadvantages and Benefits

In the past few decades, people have been more interested in how to spend more time mastering the data and less time getting it to be processed by the computer. A language about which there are only positives is the highest code.

There are practically no flaws in Python. The only serious drawback is the slowness of the algorithm execution. Yes, if you compare him with "C" or "Java", he is, frankly, a turtle. This is explained by the fact that this

The developer has taken care of adding the best in Python. Therefore, when using it, you will notice that it has absorbed the best features of other higher programming languages.

In the event that the idea implemented by the interpreter is not impressive, then it will be possible to understand this almost immediately, after writing several dozen lines. If the program is good, then the critical section can be improved at any time.

Nowadays, more than one group of programmers is working on improving Python, so it is not a fact that the code written in C ++ will be better than the one created using Python.

Which version is best to work with?

Now two versions of such a syntax system as the Python language are widely used at once. For beginners, the choice between them will be difficult enough. It should be noted that 3.x is still under development (although released to the masses), while 2.x is a fully finalized version. Many people advise using 2.7.8, as it practically does not lag and does not get confused. There are no radical changes in the 3.x version, so at any time your code can be transferred to the programming environment with an update. To download the required program, you should go to the official website, select your operating system and wait until the download is complete.

Want to get into the programming world and quickly write your first few programs? Or are you dreaming of learning new languages ​​but don't know where to start? Take a look at courses on the basics of Python programming. Read on for details on why this particular language is recommended for beginners and what programs you can create with it.

Python Fundamentals for Beginner Programmers

Python is a powerful high-level object-oriented programming language created by Guido van Rossum. It has an easy-to-use syntax, making it an ideal language for those trying to learn programming for the first time. To continue your acquaintance with the language, you can read the book by Dmitry Zlatopolsky "Python - programming basics". But we'll start with the very basics. There is a lot of literature in this area. Another option is Harry Percival's books “Python. Test Driven Development ”. It tells about the language from a practical point of view.

Using the language in practice

So, what is written in Python or "Python", as it is also called among programmers, and why learn it? Python is a general purpose language. It is used to write web applications using various frameworks, system utilities and applications to automate various actions. Courses on the basics of programming in Python are now enough to try to learn the language on your own.

This could be the backbone of a new profession, as it has a wide range of applications from web development, scientific and mathematical computing to desktop graphical user interfaces. It also works well for prototyping. That is, first a prototype is created in Python, then the concept can be transferred to faster and more compiled programming languages. Using this language, you can create desktop applications with a graphical interface and write games, for which there is a special library. The basics of algorithms and programming in Python are suitable for creating applications for mobile devices.

Why learn Python

Python also uses very simple and concise syntax and dynamic typing. Knowledge of the basics of algorithms and programming in Python allows you to quickly create a program and run it. If you need a language to quickly build applications and scripts in multiple areas, you will have a hard time finding a better alternative than Python. It has a number of obvious advantages over other programming languages:

  • universal use - different types of applications can be written in this language, therefore, along with its development, there are wide opportunities for using this language;
  • simplicity - the language was originally developed to simplify a person's work with it;
  • popularity among programmers and demand in the labor market - Python is widely used in various projects;
  • a large number of available libraries expand the capabilities of the language and make it even more universal;
  • cross-platform - once written program will work on any platform where there is a language interpreter;
  • one of the important advantages of the language is its high-quality documentation.

Python is also one of the oldest web development languages ​​created by Guido van Rossum at the National Research Institute of Mathematics and Computer Science in the Netherlands in the early 90s. The language is heavily borrowed from C ++, C and other scripting languages. It uses English keywords, which make up a lot of Python programming. If you master them, then you can assume that for the most part you have already mastered the language. This will take some time and you will need to understand the basic concepts before starting. So let's start by getting to know them.

Benefits of Python

One of the key benefits of Python programming is its interpretive nature. This means that the program code is not compiled into an executable file, but is executed by the interpreter every time it is started by the user. Therefore, to run the program, you must have it on the computer where you will create the programs. The interpreter and standard library are available in binary or source form from the Python website and can run smoothly on all major operating systems.

So, the main advantages of Python include:

  • Interpreting nature: The language is processed by an interpreter at runtime, such as PHP or PERL, so you don't need to compile the program before execution.
  • Interactivity: You can interact directly with the interpreter when you write your program.
  • Ideal for beginners: For beginner programmers.
  • Python is a great choice as it supports application development, from games to browsers to word processing.

    How to install and run the interpreter

    In order to start writing in Python, you need to download and install its interpreter on the official website of the language, choosing the version for your operating system. It is worth noting that there are two branches of the language - the second and the third. It's best to start learning the basics of Python 3 if you haven't installed a different version yet. When installing on Windows, be sure to pay attention to whether the Add Python to Path option and the Pip utility are enabled. Once installed, you can run it. To do this, on the command line, you need to enter: "python", and it will start. Three angle brackets appear in the window, indicating that you are in the interpreter. This programming language is also freely redistributable, and you can find tips, third-party tools, programs, modules and additional documentation for it.

    Keywords in Python

    In the interpreter, you can perform actions in the language interactively. Each action is performed immediately after pressing Enter. You can use it as an advanced calculator. But writing a large program in the interpreter is too time consuming. Therefore, it makes sense to use text editors. The finished text file can then be executed by the interpreter. One of the basics of Python is that any blocks in it are indented, so you need to indent to run the block and delete it. The interpreter can be easily extended with new data types or functions in C ++ or C. The Python programming language acts as an extension for custom applications. What makes this language so easy to learn is the fact that it uses English keywords rather than punctuation marks and has fewer syntactic constructs than other programming languages.

    Getting started with Python

    Before starting outside the interpreter, to create a program, you need to open a text editor and create an empty file with utf-8 encoding and set the extension “py”. It is best to use special code editors for programmers for this purpose. In the first line, you need to indicate the encoding. Lines starting with a # sign are considered comments and are not executed. Python is implicitly and dynamically typed, so you don't need to declare variables. Types are enforced and variables are also case sensitive, so var and VAR are treated as two separate variables. If you want to know how an object works, you just need to enter the following: “help (object)”. You can also use the dir (object) command to find out all the methods of a particular option, and you can use the __ doc__ object to find out its docstring.

    How to run a written program

    You must also run the written program on the command line. To do this, you need to write the name of the interpreter and, separated by a space, the name of the file with the written program. When starting the program, you must specify the full path to the file. This is not always easy, as the path can be very long, so sometimes it is easier to change the current directory on the command line and start the interpreter there. To do this, go to the desired directory, hold down the shift key, right-click on the directory and select the option “open command window” in the menu that opens. Then the command line will be launched in this directory. Next, in the console window, you need to enter the name of the interpreter and, separated by a space, the name of the file that is in it.

    Language syntax

    The basics of programming using Python as an example are not very different from other languages, but variables have a slightly different meaning. Python has no required characters to complete statements. Any blocks are indented, so you must back out to run the block and remove it. For multi-line comments, you must use multi-line lines. Values ​​are assigned using the “=” sign, and equality testing is performed with two of them “==”. You can increase or decrease values ​​using the = or - = operators with the sum on the right. This can work with strings and other data types. You can also use multiple variables on one line.

    Data types in Python

    Now let's look at data types. Python is based on data structures - dict, tuples, and lists. Kits can be found in the Kits Library, which are available in all versions of Python. Lists are like one-dimensional arrays, although you can have lists of other lists as well. Dictionaries are essentially associative arrays or hash tables. Tuples are one-dimensional arrays. Now, Python-based arrays can be of any type, and ypes is always zero. Negative numbers start from end to beginning, and -1 is the last element. Variables can also point to functions.

    Strings in Python

    Python strings can use single or double quotes, and you can use quotes of one kind in a string using a different kind. Multiline strings are enclosed in single or triple double quotes. To fill strings with values, you can use the modulo (%) operator followed by a tuple. Each% is replaced with a tuple element from left to right, and you can use dictionary substitutions as well. Python flow control statements are “while”, “for” and “if”. For branching, you need to use “if”. Use “for” to enumerate through a list. Use a range to get a list of numbers.

    Functions in Python

    The def keyword is used to declare functions. Binding another object to a variable removes the old one and replaces the immutable types. Optional arguments can be specified in the function declaration after the required arguments, giving them default values. In the case of named arguments, the argument name is assigned a value. Functions can return a tuple, and you can efficiently return multiple values ​​using tuple unboxing. Parameters are passed via reference, but tuples, ints, strings and other immutable types are immutable because only the memory location of the element is passed.

    You have just started your acquaintance with the language, so do not be afraid of mistakes and refer to the available resources to continue learning this interesting and useful programming language.

    A couple of decades ago, programmers seemed like some kind of shamans who knew what was inaccessible to others. Sometimes people learned programming "on their knees", scribbling a code on a piece of paper, because "the concentration of computer devices per capita" was extremely low. Now it is difficult to find a person who does not have a stationary computer or laptop at home. Learning technologies are also moving forward.

    A bit of history

    The Python programming language began to be developed by Guido van Rossum in the late eighties. Guido was a fellow at the Dutch CWI at the time. He wrote this language at his leisure, putting in some ideas on the ABC language, in which he was involved.

    The name of the language was not at all in honor of the reptile. In fact, the idea for the name was a popular 70s British comedy show called Monty Python's Flying Circus, although Python is still much more often compared to a snake, as even the emblem on the official website says (it shows two snake heads).

    It's not just van Rossum's design intuition that is considered the reason why the Python programming language is so popular. Learning from scratch becomes enjoyable and easy when you consider the presence of a friendly user community.

    Not so long ago, in 2008, the first version of Python 3000 (3.0), which had been tested for a long time, was released, where many architectural flaws were eliminated. At the same time, the developers tried to maintain compatibility with previous versions of the language. Although there is a more recent version, both branches (2.x and 3.x) are supported.

    Concise programming language

    Python has several advantages over other languages. It is understandable almost intuitively, has a "transparent" syntax. This means that the program code in this language is much easier to read, which reduces the time not only for writing it, but also for various modifications and checks.

    Of course, an "old school" programmer will say that you definitely need to know several languages, or you can even start by learning machine code. But after taking a course in programming in the Python language, a person will receive not only specific knowledge, but also the opportunity to realize their creative nature, creating applications and useful programs for themselves. Perhaps, soon programming will be necessary as well as knowledge of a foreign language.

    Self-doubt

    It's worth dropping the misconception that programming is hard. No, programming is much more interesting than it sounds; other activities and the so-called "lack of time" or laziness can interfere.

    Basic literature will help you quickly learn Python programming. The curriculum should start by reading two books from which you can learn the basics. The first is Python Programming by Mark Lutz and the second is Python 3 Programming by Mark Summerfield. Lutz's book describes in detail, sometimes even too much, all the basic principles on which the language is built. Some advise reading Mark Lutz not for mastering, but for deepening basic knowledge. Summerfield's book explains everything more succinctly, the author does not frighten the reader with any difficulties. There is other literature, but these textbooks are the most useful and informative.

    Introductory course

    Let's remember elementary school. As a rule, even a child comes to the first grade with some minimal knowledge: his parents worked with someone, someone went to zero. The same goes for training in the Python programming language. It is really convenient and "transparent", but without a minimum knowledge of the basic principles of the programs, training will be difficult. It's like learning notes without hearing the music. Therefore, those who have never encountered programming at all should familiarize themselves with the "introductory minimum".

    The CS50 lectures will be helpful. This is a Harvard University course on programming in Java Script, but the first lectures explain the interaction of a computer and programs in general in an accessible and understandable way. A Russian-speaking user has access to video recordings of this course with translation, additional materials, text versions of lectures and practical exercises. The video can be found almost anywhere, for example, on YouTube, but all the material in its entirety is on the Java Script site.

    In the Internet

    The Python programming language is gaining popularity, so there have been several portals for a long time, on which there are many materials for self-study. For example, "Python 3 for Beginners". This site has a lot of material for beginners, you can use it as a cheat sheet. There is also a large amount of information on this topic with free access on the Codecademy website.

    Communication on the forums is also important. Learning alone is always more difficult, so don't neglect the different communities.

    Paid courses

    You can always use paid courses, but sometimes it costs a lot of money, and the result may be unsatisfactory. Therefore, it is of course advisable to choose courses that offer a free orientation assignment. For example, there is an intensive course on "Fundamentals of Python Programming" at GeekBrains. The lesson is free, held every ten days. To sign up, you need to log in to the site.

    Tip: whichever course you choose, first familiarize yourself with the basics of the language, so as not to waste time on what you can easily learn yourself. It will be enough to read the above books.

    Of course, when the theory is mastered, you want to practice. Nick Parlante's lectures should be mentioned here. They are in English, although in general there is a lot of good educational literature in English, and this should not be surprising. In his lectures, Nick not only teaches the Python programming language, but also gives excellent practical problems.

    Usage

    The Python programming language has been used to create many applications that many people use on a daily basis. For example, this is the sixth version of the BitTorrent torrent client. Also "Python" ("Python") is used in the raster graphics editor Gimp. With the help of it, additional modules, filters, for example, are created. Much of Civilization IV and Batterfield 2 are written in this language.

    Python is used by such companies as Google, Facebook, Instagram, Dropbox, and Pinterest. It also runs in the core of the Yandex Disk application. About 10% of the company's employees write in Python, and many programmers call it their favorite language.

    How to get started

    No code can work "in the air"; the Python programming language also obeys this rule. Although training from scratch begins with theory, in fact, one might say, it begins with the installation of a working environment on a personal computer. How to do it? It's simple: you need to follow the link on the official Python website, download and run the installer, and then carefully follow the steps it suggests.

    Please note that you need to download a file suitable for the operating system installed on your computer!

    If the installation was successful, open a console (as a rule, this can be done with the keyboard shortcut "ctrl + alt + T"). Now you can write your first program. For example, enter "python3". If the console displays a "greeting", where the program version is indicated (for example, 3.4.0), then everything is in order, if not, then you need to install the third version of "Python" with the command: "sudo apt-get install python3".
    However, this is not required. You can write code in any convenient text editor and then run it through the console, or you can use the IDLE development environment that comes with the distribution kit.

    Start IDLE. It takes just one line of code to create a tiny program.

    print ("Hello world!")

    Enter this code into the IDLE window and press Enter. The environment will instantly respond with an action - it will display the required text on the screen. The first program is ready.

    Top related articles