|
Post by account_disabled on Dec 9, 2023 3:51:39 GMT -5
在深入研究用 Python 编写程序之前,了解上述术语的含义很重要。 高级语言 高级语言使程序员可以自由地编写独立于特定类型设备的程序。它们被称为高级语言,因为它们更接近人类语言。Python 是高级语言,因为它不是编译语言,Python 需要另一个程序来运行代码,这与直接在本地处理器上运行的 C 不同。 口译语言 Python 是解释性语言,因为 Python 程序的源代码被转换为字节代码,然后在 Python 虚拟机中执行,这与 C 或 C++ 不同。 动态类型语言 Python 是动态类型语言,因为在运行时会检查变量的类型。我们将在以下博客中了解数据类型。 面向对象语言 Python是面向对象的语言,因为Python开发人员可以使用类和对象来编写干净且可重用的代码。 蟒蛇_课程 使用Python的优点和缺点 使用Python的优点 由于Python语法更接近人类语言,因此更容易学习、理解和编写代码。 Python 拥有庞大的社区支持,并且拥有大量的模块、库和包。 由于其简单性,开发 Python 程序或应用程序比使用 Java 等任何其他语言进行开发要快。 Python 因其种类繁多的机器学习包和库而成为数据科学、机器学习和人工智能领域的语言选择。 几乎所有东西都可以使用Python进行开发,它还有用于应用程序开发的工具,例如kivy、flask、Django等。 使用Python的缺点 不建议与硬件组件进行通信。 Python 中没有时 手机号码数据 间优化器,因此它比大多数语言(如 C、C++ 和 Java)慢。 基于缩进的编码使得人们将语言从 C、C++ 或 Java 更改为 Python 有点困难。 搭建集成开发环境: 我们将使用 Visual Studio Code 在 Python 中编写代码。Visual Studio Code 缩写为 VS code 是一个开源代码编辑器,具有许多插件和扩展。这些插件和扩展使在 VS Code 中编写代码变得更加简单和直观。此外,与其他 IDE 相比,VS Code 非常轻量。它还具有各种主题,可以使开发环境对开发人员感兴趣。 在Windows中安装VS代码: 使用下面的链接下载 VS Code 可执行文件。 链接:VS Code IDE 编写第一个代码: 打开 VS Code,您将看到如下所示的窗口。 蟒蛇_课程 单击文件打开文件菜单,然后单击新文件,如下所示。 蟒蛇_课程 然后,VS Code 中将打开一个名为 Untitled-1 的选项卡,如下所示。 蟒蛇_课程 单击“选择语言”,将打开下面的窗口,您必须在其中选择“python”。 蟒蛇_课程 然后输入代码 print(“Python Installed Successed!!!”) 如下所示。 蟒蛇_课程 然后转到如下所示的运行选项卡并选择运行而不调试。 蟒蛇_课程 然后 VS code 会要求你保存文件。将文件保存在您想要的目录中。保存后它将运行该文件并显示如下结果。开始录制的基础 这一切都从剧本开始——文本决定了剪辑中人物的外观、风景和气氛。它还使您能够在后续生产阶段正确准备工作计划。然后导演可以对剧本进行最后的修改,使其连贯并符合他的愿景。
|
|