专业英语笔记(Download and Install Python)

部署运行你感兴趣的模型镜像
The cloud desktop has been restored, so this time I have to install 360 secure browser and Python again.

First let me visit the official website of Python: http://www.python.org

Choose this one to download:




Double-click the Python installer on the disk.





First let me start command-line Python.

If I want to display a message on the screen, what shall I do in Python?

We can use the print function. 

Since print is a function, so we must write a pair of parentheses after the function name: print()

Any function has three elements: function name, parameters, and return value.

function name 函数名 -- correspondence rule 对应法则
parameter 参数 -- independent variable 自变量
return value 返回值 -- dependent variable 因变量


您可能感兴趣的与本文相关的镜像

Python3.11

Python3.11

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

要使用Python,你不需要“编译器”,而是需要安装 **Python解释器**。以下是详细步骤,帮助你在笔记本(Windows、macOS 或 Linux)上安装和配置 Python: --- ### 1. 下载并安装 Python #### 步骤一:访问官网 打开浏览器,进入 Python 官方网站: ``` https://www.python.org/ ``` #### 步骤二:下载 Python - 点击顶部菜单的 **"Downloads"**。 - 网站会自动推荐适合你操作系统的版本(如 Windows 或 macOS)。 - 点击按钮 **"Download Python"**(例如:Python 3.12.x)。 > ✅ 建议选择最新的稳定版本(以 3.x 开头) #### 步骤三:运行安装程序 - 打开下载好的安装文件(`.exe` 或 `.pkg`)。 - 在安装界面中,**务必勾选**: ``` Add Python to PATH ``` 否则后续无法在命令行中使用。 - 然后点击 **"Install Now"** 即可完成安装。 --- ### 2. 验证是否安装成功 #### 打开命令提示符或终端 - **Windows**:按 `Win + R` → 输入 `cmd` → 回车 - **macOS/Linux**:打开“终端” 输入以下命令: ```bash python --version ``` 或(某些系统用): ```bash python3 --version ``` 如果输出类似: ``` Python 3.12.4 ``` 说明安装成功! --- ### 3. 编写与运行 Python 程序 #### 方法一:使用文本编辑器 + 命令行 1. 用记事本写代码,保存为 `.py` 文件,比如 `hello.py`: ```python print("Hello, World!") ``` 2. 在命令行中进入该文件目录,运行: ```bash python hello.py ``` #### 方法二:使用代码编辑器(推荐) 安装一个易用的编辑器,例如: - [VS Code](https://code.visualstudio.com/)(免费,功能强大) - PyCharm Community(适合初学者) 这些工具可以帮助你高亮语法、调试代码,并直接运行 Python 脚本。 --- ### 小结 | 项目 | 说明 | |------|------| | 是否需要“编译器”? | ❌ 不需要,Python 是解释型语言 | | 实际需要什么? | ✅ 安装 Python 解释器 | | 如何安装? | 从 [python.org](https://www.python.org) 下载并安装 | | 如何验证? | 使用 `python --version` 查看版本 | | 推荐工具 | VS Code / IDLE / PyCharm 写代码 | 现在你就可以开始学习和运行 Python 了!
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

酒城译痴无心剑

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值