Python is an interpreted language.
That means you can run your Python programs without the need to first link or compile them.
Python has two different modes.
These modes are called the interactive mode and the standard mode.
The interactive mode is meant for experimenting your code one line or one expression at a time.
In contrast, the standard mode is ideal for running your programs from start to finish.
Myself, I often alternate between these two Python modes.
If the task at hand is relatively easy, I tend to write the code directly in the standard mode.
However, if the code is more challenging to me,I tend to spend more time in the interactive mode.
That way I can perfect every line before I import that to the standard mode.
Python programs tend to be much shorter than equivalent programs in C or C++ or Java.
This is because Python is a high-level language.
It has data types that allow you to express complex operations in a very concise manner.
Finally, you should know how Python gets its name.
Python is not named after the snake, as you might have imagined.
In fact, Python is named after the inimitable BBC show Monty Python’s Flying Circus, a show that I highly recommend.
In addition to using just core Python, we’ll be using several Python packages to perform scientific computations.
But instead of installing more than 200 packages manually one at a time, we will be using a Python distribution.
A distribution consists of the core Python package and several hundred modules, all working seamlessly together.
All of this is available through a single download.
There are currently several Python distributions available.
The one we will be using in this course is called the Anaconda Python distribution.
At the time of recording, this redistribution supports almost 300 packages and new packages are added almost daily.
In addition, Anaconda also includes two very useful development environments,which are called Jupyter and Spyder.
This course will be making extensive use of both of these environments.
Questions often come up:
我应该学习Python 2还是Python 3？
Should I learn Python 2 or Python 3?
事实是，有些人更喜欢Python 2，有些人更喜欢Python 3。
And the truth of the matter is, some people like Python 2 better, some people like Python 3 better.
了解更多关于Python 2和Python 3问题的有用地方是Python.org。
A useful place for learning more about the Python 2 versus Python 3 issue is python.org.
That website provides an especially concise summary of the situation.
According to the website, Python 2 is legacy,whereas Python 3 is the present and future of the language.
Python 3 has, in fact, been around for already several years.
Python 3.0 was released in 2008.
So are there any downsides to Python 3?
Well, there is really only one principal downside which is that Python 3 is not backwards compatible with Python 2.
What that means, if you write your code in Python 3, somebody running Python 2 will not be able to run that code.
Here is why we will be using Python 3 in this course.
All new standard library improvements will only be available by default in Python 3.
Python 3 is also easier for newcomers to learn,and several aspects of the core language are
more consistent than those in Python 2.
Python 3 also eliminates many of the quirks that can easily trip up beginning programmers learning Python.
So this is a good time to be learning Python 3.
Many of the core Python developers believe that Python 3 became the obvious choice to learn for new projects,
starting in September 2015.
建议人们学习Python 3，除非他们有很好的理由学习Python 2。
The recommendation is that people learn Python 3 unless they have a very good reason to be learning Python 2.
所以，除非你有非常特殊的理由学习Python 2，否则我想邀请你和我一起学习Python 3。
So unless you have a very special reason to learn Python 2,I would like to invite you to learn Python 3 with me.