6hz7vif 发表于 2024-8-18 11:15:02

Python语言入门(1)-python语言里有哪些东西


    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">上篇《自学python-编程起步》</a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">里有个<span style="color: black;">意见</span>:从其官网下载安装包。不<span style="color: black;">晓得</span>您有<span style="color: black;">保持</span>到下载完成否?为方便<span style="color: black;">大众</span>,我下载了放在百度网盘上, 链接: </p>https://pan.baidu.com/s/1eKUSsVDBzoXYc3LwQWHmqw 提取码: 4mr2

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">上次介绍了python的历史和<span style="color: black;">运用</span>它的IDE工具,今天从编程语言本身的<span style="color: black;">方向</span>介绍python。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在<span style="color: black;">运用</span>过的编程语言中,python是我最<span style="color: black;">爱好</span>的语言 。编程语言数量<span style="color: black;">非常多</span>,python适合<span style="color: black;">做为</span>编程入门的首选语言,它<span style="color: black;">亦</span>不愧为众多职业程序员<span style="color: black;">运用</span>的语言,<span style="color: black;">近期</span>几年<span style="color: black;">更加是</span><span style="color: black;">作为</span>不少专业<span style="color: black;">行业</span>的<span style="color: black;">研究</span>人员钟爱的编程语言。可是Python不是我学编程的入门语言 - 当初没遇到讲python入门的书籍或老师啊。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span>学习母语,几乎都始于天生模仿,在环境里耳濡目染而习得,用于<span style="color: black;">平常</span>生活,不觉多难,未感<span style="color: black;">繁杂</span>。<span style="color: black;">然则</span>学习外语,<span style="color: black;">例如</span>大<span style="color: black;">都数</span>人在学校学习英语,几乎都是始于刻苦背诵,反复抄写,<span style="color: black;">数年</span>记忆练习。但<span style="color: black;">连续</span>把英语<span style="color: black;">做为</span><span style="color: black;">平常</span>工<span style="color: black;">拥有</span>效应用,对不少人<span style="color: black;">来讲</span>都是难事吧。英语或外语,大<span style="color: black;">都数</span>人学起来费劲,难<span style="color: black;">保持</span><span style="color: black;">运用</span>。Python是门计算编程语言,学习起来会不会更痛苦,更难以<span style="color: black;">平常</span>运用呢?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">其实完全不会。Python<span style="color: black;">做为</span>一门计算机编程语言,<span style="color: black;">必须</span><span style="color: black;">做为</span>语言去记忆、练习的部分<span style="color: black;">非常</span>的少,几乎都<span style="color: black;">能够</span>在边学边用的过程中学习得,<span style="color: black;">倘若</span>能在兴趣的引领下那就和习得母语的过程差不多了。语言本身学完了,继续的重点<span style="color: black;">便是</span>算法 - 它<span style="color: black;">能够</span>归为数学的学习与应用;算法学习到<span style="color: black;">必定</span>程度,再继续的重点应该是编程语言的应用 - 结合你的业务知识、专业<span style="color: black;">行业</span>编写程序、软件、系统…</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">学编程,要将学语言本身和用语言编程的IDE工具区<span style="color: black;">掰开</span>来,这点<span style="color: black;">必须</span>从<span style="color: black;">认识</span>上<span style="color: black;">知道</span>的。一门编程语言,其语法<span style="color: black;">常常</span>是基本固定的,标准化的,但用该语言编程常依赖的IDE工具,是<span style="color: black;">无</span>规定的,因人、因平台、因环境而异,<span style="color: black;">能够</span>比较自由的更换、自己搭配。语言是不受某个<span style="color: black;">详细</span>IDE工具约束限制的,不要学成,换一个环境,或缺了某工具就不会编程了。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">第1</span>门编程语言入门,能够带着理解去知晓计算机语言的<span style="color: black;">有些</span>基本元素,对后面进一步的自学会有促进。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">人与人说话交流,常会讲到自己之前说的事或别人讲过的事 - <span style="color: black;">由于</span>人有记忆,引用双方记忆里的事方便有效交流;有效沟通,还<span style="color: black;">必须</span>讲话有条理,要言之有物,说的事前后一致;<span style="color: black;">咱们</span>话说完,<span style="color: black;">常常</span>还要行事 - 去用行动完成语言传递信息的<span style="color: black;">最后</span>目的。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">人与计算机交流,其实类似。人脑有记忆,<span style="color: black;">做为</span>计算机的一方咋办呢?它有内存。<span style="color: black;">怎样</span>将计算机的内存和<span style="color: black;">咱们</span>的记忆链接起来呢?<span style="color: black;">咱们</span>把<span style="color: black;">晓得</span>的信息告诉计算机 - 存到计算机内存里。后面编程的人想再<span style="color: black;">说到</span>它,怎么办呢?<span style="color: black;">能够</span>在前面存时用个符号记下来,后面<span style="color: black;">必须</span><span style="color: black;">说到</span>它时<span style="color: black;">经过</span>那个符号取来用。这个符号<span style="color: black;">便是</span>编程语言里的变量,变量是方便程序员和计算机协作记忆功能的。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span>生活中的事情纷繁<span style="color: black;">繁杂</span>,<span style="color: black;">然则</span>描述事情的组织结构,对其总结出来<span style="color: black;">仅有</span>三种形式:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1,按<span style="color: black;">次序</span>,一个接一个的事情,有点像流水账;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">2,某个或部分重复<span style="color: black;">出现</span>的事情,有点像兜圈子;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">3,<span style="color: black;">按照</span><span style="color: black;">详细</span>的<span style="color: black;">区别</span><span style="color: black;">状况</span>,产生<span style="color: black;">区别</span>结果的事情,有点像挑食;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这个总结<span style="color: black;">一样</span>适合于给计算机交代事情的,编程语言只用这三种<span style="color: black;">规律</span>结构,就<span style="color: black;">能够</span>把无论多<span style="color: black;">繁杂</span>的事情,<span style="color: black;">经过</span>代码告诉给计算机去执行。这<span style="color: black;">针对</span>计算机编程语言<span style="color: black;">便是</span>:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1,<span style="color: black;">陈列</span>的一个个功能语句;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">2,循环语句;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">3,<span style="color: black;">要求</span>语句;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">详细</span>在python语言里,相应的是:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1,定义变量,调用函数等;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">2,for循环,while循环;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">3,if语句;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这<span style="color: black;">便是</span>入门编程语言学习要理解的核心内容。语言学习本身的后面内容,绝大<span style="color: black;">都数</span>都是围绕这些展开,结合手动练习加强理解。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">每一个</span>语言都有其<span style="color: black;">自己</span>的特点,每门好的编程语言都是<span style="color: black;">少许</span>计算机精英人为设计出来的,其特点<span style="color: black;">常常</span>更凸显。Python语言的特点,我感受到的最大特点是简洁,和数学表达比较容易相近。下面是在吉多推崇的python特点:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">美优于丑. 追求美是人的天性.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">直白优于隐晦. <span style="color: black;">因此</span>有<span style="color: black;">非常多</span>人更愿意与计算机打交道.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">简洁优于<span style="color: black;">繁杂</span>. python是一种简洁的语言.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">繁杂</span>优于繁复. 代码要结构清晰.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">扁平优于嵌套.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">间隔优于紧凑.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">可读性很重要.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Beautiful is better than ugly.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Explicit is better than implicit.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Simple is better than complex.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Complex is better than complicated.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Flat is better than nested.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Sparse is better than dense.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Readability counts.</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">看了,你是不是<span style="color: black;">亦</span>很<span style="color: black;">爱好</span>呢?</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/ebc95c5034db41c783057b9f8eb21e54~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723903914&amp;x-signature=YlcjSfhIuSfk67UjtBYV6QnuG6c%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">#编程#</a> <a style="color: black;">#Python#</a></p>




nuanhome 发表于 2024-9-8 01:30:47

论坛是一个舞台,让我们在这里尽情的释放自己。

4zhvml8 发表于 2024-10-25 13:37:49

你的见解真是独到,让我受益匪浅。

qzmjef 发表于 2024-10-27 22:08:32

感谢楼主分享,祝愿外链论坛越办越好!

7wu1wm0 发表于 4 天前

我完全同意你的观点,说得太对了。
页: [1]
查看完整版本: Python语言入门(1)-python语言里有哪些东西