python初学者教程下载_初学者Python教程

python初学者教程下载

Welcome to Python Tutorial for Beginners. You are probably here because you think programming is cool. But what makes it cooler? A great programming language, right? Well there are many a language available for coding purpose. But if you are looking for that super cool programming language – Python is the one.

欢迎使用Python初学者教程。 您可能在这里,因为您认为编程很酷。 但是什么使它凉爽呢? 很棒的编程语言,对不对? 嗯,有许多语言可用于编码目的。 但是,如果您正在寻找那种超酷的编程语言,那么Python就可以了。

初学者Python教程 (Python Tutorial for Beginners)

Python Tutorial, python programming, python tutorial for beginners

Python is a high level programming language which is widely used now-a-days all over the world. It’s very easy to use and adopt. It’s a general purpose language created by Guido van Rossum. For more information see this.


Python是一种高级编程语言,如今已在全球范围内广泛使用。 它非常易于使用和采用。 这是Guido van Rossum创建的通用语言。 欲了解更多信息,请参阅

In this series of Python tutorials we are going to explore the world of Python. So get ready and #happy_coding 🙂

在这一系列Python教程中,我们将探索Python的世界。 因此,准备好#happy_coding coding

Python的好处 (Python Benefits)

Well first let’s see what Python has to offer us – from many beneficiaries here’s a few to motivate you.

好吧,首先让我们看看Python为我们提供了什么-从许多受益者中,有一些激励您。

  1. Python is open source

    Python是开源的
  2. Syntax of python is easy to learn and also has high readability.

    python的语法简单易学,可读性也很高。
  3. Python has extensive support libraries.

    Python具有广泛的支持库。
  4. Python is very user friendly and has very rich built-in data structures which are easy to use. Also Python provides the option of dynamic high-level data typing which reduces the length of support code that is needed.

    Python非常易于使用,并具有易于使用的非常丰富的内置数据结构。 Python还提供了动态高级数据输入的选项,从而减少了所需的支持代码的长度。
  5. The object oriented design of Python is clean which provides enhanced process control.

    Python的面向对象设计很干净,可以提供增强的流程控制。

Concisely and most importantly Python is the language of the smartest programmers.

简而言之,最重要的是Python是最聪明的程序员的语言。

Python的应用 (Application of Python)

So let’s see some applications of Python in real life to give you a bit more impulse to learn this amazing programming language.

因此,让我们看看现实生活中的一些Python应用程序,使您有更多的冲动来学习这种神奇的编程语言。

  • To quote many, here are few companies and institutions who use Python as their one of the main programming
    language: Google, NASA, CERN, WIKIPEDIA

    引用很多,这里很少有公司和机构使用Python作为主要编程之一
    语言:Google,NASA,CERN,WIKIPEDIA
  • Social news networking site “Reddit” is entirely written in Python.

    社交新闻网站“ Reddit”完全用Python编写。
  • Python scripts serve as scripting language for web applications.So if you want a web server gateway interface you can use Python

    Python脚本用作Web应用程序的脚本语言。因此,如果需要Web服务器网关接口,则可以使用Python
  • You may hear about some famous web framework like Django, Pylons, Pyramid, TurboGears, Flask etc. All are based
    on Python.

    您可能听说过一些著名的Web框架,例如Django,Pylons,Pyramid,TurboGears,Flask等。所有这些都是基于
    在Python上。
  • NumPy, SciPy and Matplotlib ( Modules of Python) are used in Scientific computing.

    NumPy,SciPy和Matplotlib(Python模块)用于科学计算。
  • SageMath is a mathematical software programmable in Python.

    SageMath是可在Python中编程的数学软件。
  • Python has been embedded in many software products as a scripting language like- Abaqus, FreeCAD, Cinema4D,
    MotionBuilder, Softimage, GIMP and so many others.

    Python已作为脚本语言嵌入到许多软件产品中,例如Abaqus,FreeCAD,Cinema4D,
    MotionBuilder,Softimage,GIMP等。
  • Python has been used in algorithmic trading and Artificial Intelligence.

    Python已用于算法交易和人工智能。

So what else do you expect from a programming language that Python doesn’t have? To be exact nothing. That’s the beauty of Python. What do you think? 🙂

那么,您对Python所没有的编程语言还有什么期望呢? 确切地说,什么也没有。 那就是Python的美。 你怎么看? 🙂

Python安装和第一个程序 (Python Installation and First Program)

So far with the introductory part, hope you are interested enough to explore the domain of python programming language. Now let’s continue to the learning part. But for that you need to install Python in your machine.

到目前为止,在介绍部分,希望您有足够的兴趣来探索python编程语言的领域。 现在让我们继续学习。 但是为此,您需要在计算机中安装Python。

大问题:Python 2.x与Python 3.x:要使用哪个?为什么? (Big Question: Python 2.x Vs Python 3.x : which one to use and why?)

If you surf a bit you will surely face this dilemma. There are two different kind of release of Python.They are Python version 2.x( latest 2.7) and Python version 3.x ( latest 3.6 ). So which one to use and why?

如果您冲浪一下,您肯定会面临这个难题。 有两种不同的Python版本,分别是Python版本2.x(最新版本2.7)和Python版本3.x(最新版本3.6)。 那么要使用哪个,为什么呢?

Well from version numbering you can understand Python 2.x is the previous version. In Python 3.x a vast change is seen from the previous version. But this is for sure Python 3.x is far more advanced and easy to use than Python 2.x. Though still you will see a lot of references in Python 2.x. But it is wiser to go with the latest version. So in this series we will use Python 3.6.

从版本编号中可以看出,Python 2.x是以前的版本。 在Python 3.xa中,与以前的版本相比,发生了巨大的变化。 但这可以肯定,Python 3.x比Python 2.x更先进,更易于使用。 尽管您仍然会在Python 2.x中看到很多参考。 但是,使用最新版本更为明智。 因此,在本系列中,我们将使用Python 3.6。

在Windows上安装Python (Python install on Windows)

If you are using windows you need to download Python 3.x from here.

如果您使用的是Windows,则需要从此处下载Python3.x。

Simply click the installer file and follow the instructions.

python install windows

只需单击安装程序文件,然后按照说明进行操作。

Here is the image for success screen.

这是成功屏幕的图像。

You are all set. After this in your start menu you can see an entry named “IDLE- Python 3.x GUI-32/64 Bit”. Click and open it.

你们都准备好了。 之后,在开始菜单中,您将看到一个名为“ IDLE-Python 3.x GUI-32 / 64 Bit”的条目。 单击并打开它。

This is your platform for coding in Python called python shell.
Now click File->New File. You will see a new script created. Write the following lines there and save it.

这是您用于Python编码的平台,称为python shell。
现在单击文件->新文件。 您将看到一个新的脚本创建。 将以下行写在那里并保存。

print("hello world")

Below image shows IDLE app in action.

下图显示了正在运行的IDLE应用。

Now click Run->Run module. you will see in the shell-

现在单击运行->运行模块。 您会在外壳中看到-

======================= RESTART: C:/Python34/your_program_name.py =======================
hello world

That’s your first program in Python. Pretty neat. Right?

那是您使用Python编写的第一个程序。 漂亮整齐。 对?

在Ubuntu上安装Python (Python install on Ubuntu)

On Ubuntu 14.04 and later Python 3.4 is installed by default. So don’t need to do anything. 🙂
So simply open gedit or whatever text editor you are using. write the following line in it-

在Ubuntu 14.04和更高版本上,默认情况下安装了Python 3.4。 因此,无需执行任何操作。 🙂
因此,只需打开gedit或您使用的任何文本编辑器。 在其中写以下行-

print("hello world")

Now save it. And while doing it don’t forget to change the extension of the file. It will be like “your_program_name.py”

现在保存。 在执行此操作时,请不要忘记更改文件的扩展名。 就像“ your_program_name.py”

Now open terminal and run with below command.

现在打开终端并使用以下命令运行。

$python3 your_program_name.py

You will see the output will be – “hello world”. Your very first program in Python. 🙂

您将看到输出为–“ hello world”。 您的第一个Python程序。 🙂

在MAC OS X上安装Python (Python install on MAC OS X)

For MAC you can download Python 3.x from here

对于MAC,您可以从此处下载Python 3.x

After downloading, double click it. you can see an installer popped up.

python tutorial, python installer mac

下载后,双击它。 您会看到一个弹出的安装程序。

Just follow the instructions and click on Next buttons and it will install Python on your Mac. Below is the success screen.

python installation on mac

只需按照说明操作,然后单击下一步按钮,它将在您的Mac上安装Python。 以下是成功屏幕。

Now search for IDLE app. Click and open it. This is your platform for coding in Python called python shell.

现在搜索IDLE应用。 单击并打开它。 这是您用于Python编码的平台,称为python shell。

Now click File->New File. You will see a new script created. Write the following line there and save it.

现在单击文件->新文件。 您将看到一个新的脚本创建。 将以下行写在那里并保存。

print("hello world")

Below image shows IDLE app in action.

python shell

下图显示了正在运行的IDLE应用。

Now click Run-> Run module. you will see in the shell-

现在单击运行->运行模块。 您会在外壳中看到-

======================= RESTART: ~your_program_name.py =======================
hello world

That’s your first program in Python. Isn’t it cool?

那是您使用Python编写的第一个程序。 是不是很酷?

Python教程总结 (Python Tutorial Conclusion)

Well, for the very beginner IDLE is a standard platform for coding. Though for experienced coders, many like to use different IDEs( Integrated Development Environment ). There are a lot of IDEs available. It’s a matter of perspective which one is better. But for the later part of this tutorial series we will use “Pycharm” as our IDE. But for now IDLE is enough. So sit tight and get ready for the next part.

好吧,对于初学者来说,IDLE是编码的标准平台。 尽管对于经验丰富的编码人员,许多人喜欢使用不同的IDE(集成开发环境)。 有很多可用的IDE。 从一个角度来看哪个更好。 但是在本教程系列的后半部分,我们将使用“ Pycharm”作为我们的IDE。 但是现在IDLE就足够了。 所以请坐好,为下一部分做好准备。

翻译自: https://www.journaldev.com/13949/python-tutorial-beginners

python初学者教程下载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值