Getting Started with Python (1/18)
**Section One **Meet Pyhton
Hello everyone, starting today, let's learn together: Getting Started with Python
Before starting, there are 3 tips about learning methods:
1、 Please take 30 minutes every day to study 1 lesson. Any learning of knowledge and skills requires continuous repetition to consolidate the effect of learning.
2、 According to the lesson plan, we will learn to write Python code. No matter how simple or complex the code is, please follow me to write it together so that you can learn faster and better!
3、 The first secret to becoming a programming master is: work hard to write more code!
Let's make it together!
Let's officially start learning...
1、 Official introduction to Python
The market’s accepted evaluation of Python is:
Python is one of the very few programming languages that can have both simple and powerful at the same time. It allows you to focus on how to solve the problem without having to stick to the syntax and structure of the code.
**PS: **Python has therefore become an ideal language for scripting and rapid development in many fields and most platforms.
**2、 What is the use of learning Python? **
When it comes to the usefulness of Python, that's more! The amazing thing is that, in addition to the areas where conventional computer languages are good at, it is also a popular computer language for current IT technologies such as big data, machine learning, and artificial intelligence.
3、 Why choose Python
This is a good question.
In the foreseeable future, computer application technology will be a huge driving force for the advancement of human society. After experiencing the age of agriculture and industrialization, mankind has boarded the high-speed train of the information age and is rapidly advancing into the era of artificial intelligence. What can enable us to keep up with the pace of this era?
There is no doubt that computer technology!
And Python, a simple and powerful language, appeared in front of us at the right time, and what's even more amazing is that each of its strengths fits the needs of the times.
If you are a zero-based, we strongly recommend Python as your first language. If you already have the foundation of computer software, Python will also help you achieve a better life in the future.
4、 The story of the birth of Python
There are two versions here, you can choose to trust one of them, it will not have any impact on the learning and application of python. Sometimes, legends may also bring you magical powers.

5、 About Guido
Guido von Rossum Guido von Rossum
Guido von Rossum (Guido), Dutch.
1982 In 1999, he received a master's degree in mathematics and computer science from the University of Amsterdam.
1989 In 1999, he founded the Python language. At that time, he was still a researcher at CWI in the Netherlands.
1991 At the beginning of the year, Python released its first public release.
1995 Immigrated to the United States in 2016.
2002 In 2015, at the European Conference of Free and Open Source Software Developers in Brussels, Belgium, he won the 2001 Free Software Progress Award issued by the Free Software Foundation.
2003 In May 2015, he won the Dutch UNIX User Group Award.
2006 In 1999, he was recognized as a famous engineer by the American Computer Society (ACM).
2005 In December, joined Google. Wrote a web-oriented code browsing tool for Google in Python.
2012 On December 7, 2016, he joined Dropbox.
6、 Features of Python language
The following content, for beginners, we only need to understand a little bit, the characteristics of the Python language, we will have a deeper experience in practical applications later.
(1) Simple
Python is a simple, minimalistic language. Reading an excellent Python program code is like reading a natural language article, even though its syntax requirements are very strict!
Python's pseudo-code-like nature is one of its advantages. It allows you to focus on the solution to the problem rather than the language itself.
**PS: **Pseudo-code usually refers to a kind of code written by programmers in order to improve efficiency when they are researching or discussing problems. However, everyone can understand the meaning of the code.
(2) Easy to learn
As you will see next, Python is a very easy language to get started. It has a very simple and rigorous grammar system.
(3) Free and open
Python is a member of the FLOSS community. You can therefore freely distribute copies of Python software, read its source code, and make changes to it, or use part of it in a new free software.
**PS: **FLOSS is a free/open source software community based on the community concept of sharing knowledge. This is one of the main reasons why Python is so good. It was created by a group of community members who want to see Python get better, and it continues to be improved.
(4) Advanced language
When you are writing a program in Python, you don't have to consider the low-level details of the computer processing data such as how your program should use memory. In fact, this is a common feature of high-level computer languages.
**(5) Cross-platform **
Due to the characteristics of open source, Python has been ported to many other platforms, as shown in the following list.
GNU/Linux, Windows, FreeBSD, Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS, Psion, Acorn RISC OS, VxWorks, PlayStation , Sharp Zaurus, Windows CE and PocketPC
In fact, if you pay attention to avoiding some system-dependent features, your Python program can even work on any of these platforms without any changes.
**PS: **If you want, you can run Python on any of the above platforms! You can even make games that can run on your computer, iPhone, iPad, or Android phone through a certain type of platform.
(6) Explanatory
When we program in languages such as C or C++, we need to pass the source code through a compiler to convert them into the language used by the computer (such as binary encoding) to significantly improve the running speed of the code. Therefore, such programming languages are called compiled languages.
However, when programming in Python language, you can run it directly after writing the code. The running of Python code relies on an interpreter inside Python, which runs and interprets line by line. Therefore, Python is an interpreted language.
In fact, this makes Python easier to use. Because you don’t need to think about compilation issues, the program is more portable and easy to migrate. You only need to copy the Python program to another computer and it will start working immediately!
**PS: **In fact, within the program, Python will convert the source code into the intermediate form of bytecode, and then convert it into the language used by your computer, and run it, the execution efficiency is still very high.
(7) Object-oriented
Python supports both procedure-oriented and object-oriented programming.
In the process-oriented programming mode, the program is constructed by subroutines and functions with only reusable characteristics. In the object-oriented programming model, programs are constructed by objects that combine data and functions.
Compared with large languages such as C++ or Java, Python has a special, powerful and simple way to implement object-oriented programming. (PS: This point is very worthy of our attention, and we can see it in Gaodu’s Python Web development course)
(8) Scalability
If you need an important part of the code to run quickly, or if you want some parts of the algorithm not to be made public, you can write these programs in C or C++, and then use them in your Python programs.
**PS: **In fact, it is a good solution in scenarios where intellectual property awareness is not particularly strong.
(9) Embeddability
You can embed Python in your C or C++ program to provide scripting functions to users of your program.
(10) Rich library
Python has something called the standard library, which is very large. It can help you accomplish many things, including: regular expressions, document generation, unit testing, multi-threading, databases, web browsers, CGI, FTP, mail, XML, XML-RPC, HTML, WAV files, password systems, GUI (Graphical user interface), and other system-dependent activities.
Just remember that as long as your computer has Python installed, these functions will be available at any time. Their existence is called Python Batteries Included.
**PS: **In addition to the standard library, you can also discover many other high-quality libraries in the Python Package Index.
7、 Version issue
Python is highly concerned in China, and it should be the past 1-2 years. But the birth and popularity of Python can be traced back more than 20 years ago, earlier than Java and Asp.Net. And, because of its open source features, it has accumulated very rich resources. There are many iterations of the Python language itself.
However, there are currently two main popular versions on the market, Python 2 and Python 3.
Usually, when we talk about Python 3, we mean Python 3.0 and above. When we made this course, the official download was Python 3.7.0. And Python 2 usually refers to Python version 2.7. It does have some obvious differences in syntax from Python 3.
Although Python 2 programs will be more compatible with more application extensions, but even so, I strongly recommend that you choose to use the Python 3 version.
The code of our course will be based on Python 3 syntax.
Of course, once you learn and correctly understand any of these versions of Python, you can easily understand the other versions and quickly learn how to use it.
summary
Python is really fascinating! It really is an exciting and powerful language. Its creation appropriately chooses the balance of performance and function, making the writing of Python programs simple and fun.
Here is a special reminder to everyone: **Don't be afraid to write code. In fact, writing code itself is a kind of fun, it is a kind of fun that can create a world. **
Of course, for anything to achieve extraordinary achievements, it cannot be completely dependent on fun. There is also aesthetic fatigue when writing code. What should we do when this happens?
Once there was a great man who said a magical secret: Either write the program simple enough to make it seem obvious that there is no problem; or write the program sufficiently complex to make it obvious that there is no problem.
Haha, don't get me wrong, don't get me wrong! What he meant was: bugs are inevitable. Whether you are a beginner or an expert, we all have common troubles, but this is not important.
Recommended Posts