美文网首页
用英语学Python | Day1 Python 入门

用英语学Python | Day1 Python 入门

作者: 春暖花开奇奇乐乐 | 来源:发表于2021-01-26 23:16 被阅读0次

    What can Python do? (Python 可以做什么?)

    Web开发

    Python can be used on a server to create web applications. (在服务器上使用 Python 创建 Web 应用程序)

    系统脚本

    Python can connect to database systems. It can also read and modify files. (连接到数据库系统,读取和修改文件)

    数学

    Python can be used to handle big data and perform complex mathematics. (处理大数据并执行复杂的数学运算)

    软件开发

    Python can be used alongside software to create workflows. (与软件一起使用创建工作流)

    Python can be used for rapid prototyping, or for production-ready software development. (快速原型设计,生产就绪的软件开发)

    Python语法初印象

    语法与英语类似

    Python has a simple syntax similar to the English language. Python 有一种类似于英语的简单语法。

    有点儿惊讶,也有点儿好奇,期待学成后做个比较。

    Python Syntax compared to other programming languages (Python 语法与其他编程语言比较)

    Python was designed for readability, and has some similarities to the English language with influence from mathematics. (Python 是为可读性设计的,与英语有一些相似之处,并受到数学的影响。)

    Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.(Python 使用新行来完成命令,而不像通常使用分号或括号的其他编程语言。)

    Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly-brackets for this purpose.(Python 依赖缩进,使用空格来定义范围;例如循环、函数和类的范围。其他编程语言通常使用花括号来实现此目的。)

    Python Indentation (Python 缩进)

    Indentation refers to the spaces at the beginning of a code line. 缩进指的是代码行开头的空格。

    Python uses indentation to indicate a block of code. Python 使用缩进来指示代码块。

    Python will give you an error if you skip the indentation. 如果省略缩进,Python 会出错。

    The number of spaces is up to you as a programmer, but it has to be at least one. 空格数取决于程序员,但至少需要一个。

    You have to use the same number of spaces in the same block of code, otherwise Python will give you an error. 您必须在同一代码块中使用相同数量的空格,否则 Python 会出错。

    缩进要点总结:

    1. Python用缩进指示代码块。

    2. 不可省略缩进。

    3. 没有规定空格数,但同一代码块中的空格格式要保持一致。

    注:英文和中文内容分别来自www.w3cschool.com。

    如果你有任何建议或想法,欢迎在下面留言告诉我哦! 

    也欢迎关注我的微信公众号:英语三年之约

    相关文章

      网友评论

          本文标题:用英语学Python | Day1 Python 入门

          本文链接:https://www.haomeiwen.com/subject/rqdgzktx.html