python3xiaobaike_2020/chapter1/1-4 python3小白课:我的第一个python脚本.md
2025-04-20 23:22:14 +08:00

41 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# python3小白课我的第一个python脚本
python脚本文件是一系列python命令的集合一般一行一条命令它的编写很简单普通的文本编辑器就能完成。
这里我们使用vscode软件来进行编写。
> [!danger]
>
> 这里并不推荐使用记事本来编写python脚本因为可能会有编码的问题python3脚本默认的编码为utf-8。
这是一款十分好用轻便的代码编辑器,拥有丰富的插件和精美的代码配色,让你在编程的道路上事半功倍。
该软件是免费开源软件,大家直接下载安装使用即可。
软件的下载和使用配置请参考本笔记的首页的底部。扩展方面,安装一个`python`扩展即可出品方为Microsoft微软官方。
安装和配置完成后我们新建一个文件即可开始编写我们的第一个python脚本程序。
编写内容:
```python
# coding:utf-8
print("你好小白同学我是萌萌哒python~")
```
保存为`hello.py`
这里请注意python脚本文件的后缀名为`.py`
这样我们的第一个python脚本文件就写好啦下节课我们来运行一下看吧
### 单词释义
| 单词 | 释义 |
| ------ | ------------------------- |
| coding | 代码原型是codeing形式 |
| hello | 你好 |