当前位置: 首页 > news >正文

python教程修订版

9/23

In this course, I'm going to teach you everything you need to know to get started programming in Python.

Now, Python is one of the most popular programming languages out there在众多的……中.

And it's by far目前为止 one of the most sõught after受欢迎的 for jobs.

And so if you're trying to get a job or you're trying to ãutömāte自动化 your life or you're trying to write awesome scripts to do a bunch of一堆 different things, then Python's for you.

Honestly, more and more developers every day are moving their projects over to Python because it's such a powerful and it's such an easy to use language.

A lot of programming languages out there just aren't very beginner friendly.

There's a lot of sỳntax.

There's a lot of like little things that if you get wrong, the program will yell at you.

Python is the complete opposite of that.

You basically just type out what you want to do and Python does it.

It's that simple.

There's not a whole lot of大量的 syntax to learn.

The learning cûrve曲线 is litërälly字面意义的 zero.

You jump in, you can start writing your first program in seconds.

In this course, I'm going to teach you guys everything you need to know to get started in Python.

I designed this course, especially for Python.

And each lesson has been specially designed with examples that will help you along the way.

with so many people starting to learn Python.

The question isn't why should you learn Python? The question is, why shouldn't you?

And I think for a lot of people the reason they might not want to learn Python is because they're intimidāted害怕担心 or they're afraid that it's going to be too hard.

Trust me, I am going to hold your hand through this èntīre全部的 course.

We're going to talk about all the cõre concepts核心概念 in Python.

We're going to look at everything you need to know to start programming in Python and start being confïdënt自信的 and start writing scripts and start writing programs that are awesome and doing cool things in your life.

Anyway, I'm super pûmped to迫不及待 be teaching you guys Python.

I can't wait to get started in this course.

And I hope you guys stick around逗留 and follow along with the course and learn this amazing programming language.

In this tūtõríäl教程, I'm going to show you guys how to install Python onto your computer.

And we're also going to install a text editör文本编辑器 that we can use to write our Python programs in.

So the first order of business首要任务 is to actually install Python on your computer.

So what we want to do is head over前往 to our web browsër浏览器.

And you want to go over here to this page, it's just www.python.org forward slash正斜杠/ downloads.

And on this page, there's going to be two buttons down here.

And it's just going to say download Python 3.6.3.

And at least that's the version that I have right now.

or download Python 2.7.1.4.

So here's the thing about Python, there's actually two mājör主要的 versions of Python that are in use cûrrëntly目前.

There's Python two, and there's Python three.

So you can see over here, this is like 2.7.1.4.

Basically, any Python two version we would just refer to as like Python two.

And here's like the latest Python three version.

And so there's these two versions that you can download.

And the first thing we have to decide is which version do we want to download.

9/24

And here's the basic difference:  
Python two is a legäcy遗留 version of Python,  
which basically means that it's like an old version,  
and it's not being like actively积极 maintained维护 or süppõrted提供帮助 like öfficiälly官方的,正式的 by Python anymore.  
Python three is like the future of Python.  
It's like the newest version.  
It's the one that's getting actively maintained and supported.  
And so there's prōs优点 and cõns缺点 to picking either one.  
A lot of people will say like Python two has been around longer.  
And so there's more like libraries,  
there's basically just more Python code written in Python two.  
So therefore, like there's a few more things that you can do in Python two than you can do in Python three.  
But then again另一方面, Python two is not supported.  
And you know, five or 10 years from now, probably no one's going to be using it.  
Python three, like I said, is like the future of Python.  
It's the newest version.  
It's the one that, you know, is sort of有点算是 being maintained going forward今后.  
So for the pürpöses of 为了this tutorial, I'm going to be teaching you guys Python three.  
So we're going to want to download Python three.  
Now here's the thin·g, like, if you learn Python three or you learn Python two, the differences aren't very big.  
There are a few differences in like some syntax and just some, you know, little things here and there.  
But if you learn Python three, you'll be able to jump right in and code in Python two as well.  
Don't let anyone, you know, tell you that you have to learn one or the other;  
we're going to learn Python three just because it's I think probably the best for a beginner to learn.  
And so that's the one that we want to download.  
So I'm just going to click点击 download Python three.  
And we're going to go ahead and download this version.  
And when that's done downloading, I'm just going to head down to my downloads fōldër文件夹.  
And you'll see here, we just have this file,  
I'm just going to double click.  
And we get this like Python installer.  
So I'm just going to click through here.  
And we'll be able to install Python three on our computer.  
All right, when that's done installing, we can just close out of this,  
and we should be good to go准备好了.  
So now we have Python three installed on our computer.  
The next step is we need to choose a text editor.  
So we're going to be writing a bunch of code.  
So we're going to need some, you know, ènvīrönmënt环境 or some program that we can write all that code in.  
And really, you can write Python in any text editor;  
you could write it in like notepad or text edit, it doesn't really matter.  
But there are special text editors that are designed just for writing Python code.  
And these are called IDEs.  
And that stands for...的缩写 intègrāted集成的 development environment.集成开发环境  
It's basically just a special environment where we can, you know, run and exècúte执行 our Python code.  
And it'll, you know, basically like tell us how we're doing.  
So if we're, you know, if we write something that's wrong or we have errors,  
it'll kind of point us in the right dïrection方向、指引 of what we need to do to fix that stuff.  
So in this course, we're going to be using an IDE.  
And one of my favorites, and one of the most popular IDEs for Python, is called pychårm.  
So I'm over here on this website, it's called https://www.jetbrains.com/pycharm/.  
And this is the IDE that we're going to be using in this course.  
So I'm just going to come over here and click this big download now button.  
And we'll go ahead and download this pycharm program.  
Alright, so I'm getting this page over here.  
You can see there's two versions of pycharm.  
One is a pröfessiönäl专业 version, and that one's like paid, so you have to pay for it.  
But then there's this cömmúnity社区 version down here, and that's free and open sõurce资源.  
So I'm just going to download this one.  
And this should have everything we need to get started using Python.  
Alright, when that finishes downloading, I'm just going to pull that up 打开in my downloads folder.  
And again, we can just sort of run this guy.  
And I'm on a Mac.  
So I'm going to have to drag拖 it over to my applications folder.  
Alright, so we now have pycharm.  
And we have Python three installed on our computer.  
So we're ready to start programming in Python.  
And this tutorial, we're going to create our first Python program.  
And we're going to be able to run it and see how everything works.  
The first thing I want to do is open up pycharm.  
So pycharm was the IDE, the integrated development environment that we downloaded in the last tutorial.  
So I'm just going to go ahead and search for it on my computer.  
And I can just open it up.  
And when we first open up pycharm, we should basically just get a window prompting引导 us to create a project.  
So you can see that down here.  
Actually, the first thing I want to do though is come over here to cönfig[y]üre.  
And I'm just going to click on preferënces偏好.  
And I actually want to change the äppēaränce外观.  
So I'm going to go ahead and give this a thēme主题.  
So I just went over here to appearance and bèhāvíör行为, appearance.  
And I'm going to change the theme to dark.  
Just because I think it's a little bit easier to use and look at.  
But you don't have to do that if you don't want to.  
And so down here, I'm just going to click create new project.  
And it's going to give us this little window right here.  
So I can just name my project.  
And I'm just going to name this draft草稿.  
And then there's this other option选项 down here where it says intërprètër解释器.  
Now, what we want to select is Python version three.  
So if I click down here, you'll notice that there's a couple different options.  
So I'm on a Mac computer.  
And by dèfãult默认, Mac has Python version two installed on it.  
If you're on a Windows mächine机器, I'm not sure if it does.  
But in this tutorial, we're going to be using Python three.  
So you want to make sure that you have Python three selected as the interpreter.  
Other-wise否则, you might not be able to fully follow along with what we're doing in this video.  
So now I'm just going to come down here and click create.  
And this is going to go ahead and create our project for us.  
All right, so now we have our Python project up and running.  
And I want to show you guys how we can create our first Python program.  
So over here in this draft folder, and this is just that project that we created,  
I'm just going to right-click and I'm going to say new.  
And I'm going to come down and click Python file.  
So we want to create a new Python file; this will be our first Python program.  
And I can just give this a name.  
So why don't we just call this app?  
And I'm just going to click okay.  
All right, so now we have our first Python file open.  
And we can just start typing in some Python.  
So I want to show you guys just a very basic Python program.  
And this is just going to be a hello world program.  
So we're just going to print something out onto the scrēen屏幕.  
So what I want to do is I want to type out print.  
And I want to type in open and closed pärenthësēs园括号.  
Now inside of this parentheses, we can make some quōtātion引用 marks.  
And inside of the quotation marks, I'm just going to type out hello world.  
So this is like a very basic Python program.  
And what this is going to do is it's just going to print out hello world onto the screen.  
And so now what I can do is I can actually run this file,  
and we're actually getting a little error here.  
It wants us to create a new line at the end of the file.  
And so now, in order to为了 run our Python program,  
I'm just going to come up here to the top.  
And I'm just going to click run.  
And we'll click this run button right here.  
And now we'll see what happens.  
So it's asking me what I want to run.  
I can just click app.  
And down here at the bottom, you'll notice that...,  
that just got printed out, hello world.  
And so whatever任何 I print, or whatever I put inside of this print stātëmënt指令,  
is going to get printed out down below in the cönsole控制台.  
So as long as只要 you're getting that print statement to work,  
then you've actually written your first Python program.  
And as we go through forward 继续in the course,  
we're going to be writing all sorts of awesome Python programs.  
And we're going to be doing all sorts of cool stuff. In this tutorial, I want to talk to you about writing a basic Python program.  
So we're going to write just a very simple Python program.  
We're going to look at how we can go ahead and write our programs,  
we're going to talk about how our programs are getting executed by Python.  
And we're also going to drãw画 out a little shape形状 onto the screen.  
So this is going to be pretty cool.  
I'm excited to talk to you guys about just the báre basics最基本 of Python,  
and really just sort of give you an intrödûction介绍.  
So over here, we have our basic text editor.  
And so any of the Python code that I write inside of this file  
is actually going to get executed by Python.  
So this Python file has a bunch of Python code inside of it.  
And basically what we're doing when we're programming in Python  
is we're just giving the computer a set of一组 instrûctions命令.  
Right, that's really what programming is;  
it's just like we're specifýing指定 a set of instructions.  
And the computer is going to go off运行 and execute those instructions that we give it.  
And so the more complex复杂 the instructions we give to the computer,  
the more complex the tasks任务 the computer can carry out.  
So I want to show you guys how we can use some Python instructions  
or some Python code in order to draw out a shape onto the screen.  
So I'm actually going to draw out a little trīangle三角形.  
So over here, we can actually print something out onto the screen in Python  
using something called print statements.  
So I can just type out print.  
And inside of these parentheses, I can just type some quotation marks,  
and inside the quotation marks, we can put whatever we want to print out onto the screen.  
So I'm going to copy this and I'm actually going to make a few of these little print statements.  
And we're going to actually draw a shape.  
So we're going to draw like a triangle type shape.  
So down here, I'm just going to draw a forward slash.  
And then up here, I'll make a space空格 and we'll do another forward slash.  
Here, we'll make two spaces, we'll do another forward slash.  
And over here, we're going to make three spaces and a forward slash.  
And now I'm going to draw like vërticäl垂直 bars going all the way down.

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 当电子设计竞赛照进生活!
  • 4G 网络下资源加载失败?一次运营商封禁 IP 的案例分享
  • 【RabbitMQ】死信队列、延迟队列
  • 什么是电商云手机?可以用来干什么?
  • 2025年SEO策略:如何优化您的知识库?
  • ComfyUI中缺失节点安装一点小小注意事项
  • 详解常见排序
  • 三丰云免费虚拟主机及免费云服务器评测
  • OpenEuler22.03 LTS-SP1 开启SSH的X11 Forwarding,并使用Edge浏览器
  • ‌[AI问答] Auto-sklearn‌ 与 scikit-learn 区别
  • 「数组」离散化 / Luogu B3694(C++)
  • [晕事]今天做了件晕事45 ssh 远程执行命令与>
  • 828华为云征文 | 将Vue项目部署到Flexus云服务器X实例并实现公网访问
  • 2.3 数据通信基础知识
  • CAN协议一致性测试——深入浅出理解CAN协议(四)
  • ----------
  • __proto__ 和 prototype的关系
  • cookie和session
  • crontab执行失败的多种原因
  • CSS实用技巧干货
  • javascript面向对象之创建对象
  • js面向对象
  • JS实现简单的MVC模式开发小游戏
  • Laravel Mix运行时关于es2015报错解决方案
  • Lsb图片隐写
  • MYSQL 的 IF 函数
  • MySQL几个简单SQL的优化
  • Otto开发初探——微服务依赖管理新利器
  • Spring Cloud中负载均衡器概览
  • unity如何实现一个固定宽度的orthagraphic相机
  • windows下使用nginx调试简介
  • 官方新出的 Kotlin 扩展库 KTX,到底帮你干了什么?
  • 猴子数据域名防封接口降低小说被封的风险
  • 快速构建spring-cloud+sleuth+rabbit+ zipkin+es+kibana+grafana日志跟踪平台
  • 前端面试之闭包
  • 区块链分支循环
  • 使用权重正则化较少模型过拟合
  • 问:在指定的JSON数据中(最外层是数组)根据指定条件拿到匹配到的结果
  • 学习HTTP相关知识笔记
  • linux 淘宝开源监控工具tsar
  • Redis4.x新特性 -- 萌萌的MEMORY DOCTOR
  • 没有任何编程基础可以直接学习python语言吗?学会后能够做什么? ...
  • ​​​【收录 Hello 算法】9.4 小结
  • ​创新驱动,边缘计算领袖:亚马逊云科技海外服务器服务再进化
  • ​力扣解法汇总1802. 有界数组中指定下标处的最大值
  • #AngularJS#$sce.trustAsResourceUrl
  • #pragam once 和 #ifndef 预编译头
  • #QT(TCP网络编程-服务端)
  • $(function(){})与(function($){....})(jQuery)的区别
  • $.extend({},旧的,新的);合并对象,后面的覆盖前面的
  • (cljs/run-at (JSVM. :browser) 搭建刚好可用的开发环境!)
  • (二)PySpark3:SparkSQL编程
  • (二)延时任务篇——通过redis的key监听,实现延迟任务实战
  • (论文阅读31/100)Stacked hourglass networks for human pose estimation
  • (十七)devops持续集成开发——使用jenkins流水线pipeline方式发布一个微服务项目