With the increasing popularity of artificial intelligence ,Python We hear this word more and more , With Python There are also many sentences with this word in our sight : Life is too short , I use Python;Python- Artificial intelligence first language and so on .Python It's really like what people say . That good ? There are so many programming languages , There are also commonly used 10 Varied ,Python Why can we ascend the throne of the first language of artificial intelligence ?
In all programming languages ,Python Not young , from 1991 First version released in , So far it's almost 30 Years. . Recent years , With the popularity of the concept of artificial intelligence ,Python It's heating up fast , Become numerous AI The preferred language for practitioners . that Python What magic is there ? Let's look at four main points to see why Python Can become the first language of artificial intelligence .
Compared with other languages ,Python It has a simple 、 The advantage of being intuitive and easy to understand . We have invited the famous for efficiency C Language , And those who have made outstanding achievements in business Java Language , Let them and Python comparing . We use them separately 3 Write a in one language HelloWorld, See who is more friendly to novices .
First of all C Language :
Um. , The amount of code is OK , not {} There are three lines of code . however ,int,main,return What is this and what ? For starters , At first, I had to force my memory , There is no element of understanding , We just need to understand printf() Used to output , Even if the others are explained , It is no different from the heavenly book .
Next, the Java Language comes on , Also output HelloWorld Example :
Resemblance ratio C The language is more complicated . because Java The object-oriented nature of language , So any code must be placed in class Inside , therefore Java There are many fixed codes . Also for beginners ,Java Language is also a process from memory to understanding , Can only force memory .
C and Java The language doesn't seem very friendly to novices , that Python What will language do ? Same example , Will there be different results ?
Just a word , Want to output helloworld, a line print That's enough . No, C and Java So many formats and things that need extra memory . So who is the novice Welfare , Who is the rookie killer ?
Of course , Just one Hello World Words ,C and Java There are not many lines of code . But don't forget ,C and Java All compiled languages , The code must be compiled before running .
What is compilation ? original , Besides the difficult machine language , The program we write cannot be read directly by the computer . It's going through “ translate ” The process of , Computers can “ understand ” Instructions to execute . act as “ The interpreter ” Is the compiler program . When the high-level language source program enters the computer , Translated into object program by compiler , To complete the operation to be processed by the source code and obtain the results .
about C language , What compilers are used on different operating systems , It is also a question that needs to be considered . Once the code is brought to the new machine , The operating environment is different from before , You also need to recompile . Sometimes different computers have different compilation environments , We also have to write files to modify the source code to meet the needs of the compilation environment .
and Python It's an interpretive language . Acting as the translator of programming language and machine language is the interpreter , The interpreter doesn't translate the whole program at once , But every translation of a line of program narrative immediately runs , Then translate the next line and run , No object program is generated . An interpreter is like simultaneous interpretation , Every time a programming language finishes a sentence , The interpreter immediately translates to the computer , The computer immediately executes the program .
We can understand that ,Python Language program does not need to install a compiler to compile the program , You can run it directly . and C and Java You need to install the compiler , And if the version deviates from the environment , You may also need to modify the source file . So for beginners , Use Python Such explanatory language is more intuitive and convenient , And it's easier .
Learn from good examples Python Whether it's employment or sideline, it's good to make money , But learn to Python Still have a learning plan . Finally, let's share a complete set of Python Learning materials , For those who want to learn Python Let's have a little help !
Python The technical points in all directions are sorted out , Form a summary of knowledge points in various fields , The use of it is , You can find the corresponding learning resources according to the above knowledge points , Make sure you learn more comprehensively .( At the end of the article !)
reminder : Limited space , Packaged folder , The way to get it is “ At the end of the article ”!!!
When I learn a certain foundation , When you have your own understanding , I will read some books compiled by my predecessors or handwritten notes , These notes detail their understanding of some technical points , These understandings are quite original , You can learn different ideas .
Watch the zero basics learning video , Watching video learning is the quickest and most effective way , Follow the teacher's ideas in the video , From foundation to depth , It's still easy to get started .
Optical theory is useless , Learn to knock together , Do it , Can you apply what you have learned to practice , At this time, we can make some practical cases to learn .
Check the learning results .
We learn Python Must be to find a well paid job , The following interview questions are from Ali 、 tencent 、 The latest interview materials of big Internet companies such as byte , And the leader Ali gave an authoritative answer , After brushing this set of interview materials, I believe everyone can find a satisfactory job .
Guarantee 100% free
】List of articles background
Catalog One 、 What is? Q lear
一、報錯分析所運行的YOLOv5 github地址:http