Python 基础
编程的第一步 —— 无需任何基础。
- python
- 22 课程
- 6 projects
- 15 videos
- 在浏览器中运行
此设备:完成 0 / 22 门课程
每节课均在浏览器中运行——编写真实代码,点击运行,任务自动检查。免费,无需账户,配有与英文对照的翻译笔记。
本课程中的课程
显示 26 / 26 门课程
没有找到匹配的课程。请清除搜索条件或选择其他筛选器。
Part 1 You build: Project: Mad Libs
- 先跑起来 这些按钮 · 出错的时候 · 程序等你输入的时候 Lesson 0 · 3 项必做任务 · ★
- 你的第一个程序 Show text with print · Strings · Comments Lesson 1 · 3 项必做任务 · ★ 视频
- 变量 A box with a name · Make a variable · Naming rules · Change a variable Lesson 2 · 3 项必做任务 · ★ 视频
- 数字与运算符 Two kinds of number · Add, subtract, multiply, divide · Whole-number division, remainder, powers · Order of operations Lesson 3 · 3 项必做任务 · ★ 视频
- 获取输入 Ask the user with input · When your program waits · input always gives a string · Turn text into a number Lesson 4 · 3 项必做任务 · ★ 视频
- 字符串操作 Letters have positions · Take a slice · Length and changing case · f-strings build text Lesson 5 · 4 项必做任务 · ★★ 视频
- 项目 Project: Mad Libs Collect the words · Change a word · A title with a line under it 项目 · ★★
Part 2 You build: Project: Guess the number
- 做出决策 Making a choice · Comparisons · if / elif / else · The remainder Lesson 6 · 4 项必做任务 · ★★ 视频
- 计数循环 Repeat with for · Counting with range · Build a total (accumulator) · Words and a number on one line Lesson 7 · 4 项必做任务 · ★★ 视频
- While循环 Loop while a condition is true · Always change the condition · break and continue · Checking before or after Lesson 8 · 3 项必做任务 · ★★ 视频
- 项目 Project: Guess the number One guess · Keep guessing · Print the count · The sentence 项目 · ★★★
Part 3 You build: Project: Quiz with a score
Part 4 You build: Project: Rock, paper, scissors
Part 5 You build: Project: Text adventure
- 作用域与参数 Local variables · Global variables · Default values · How arguments are passed Lesson 11 · 4 项必做任务 · ★★★ 视频
- Dictionaries (records) Store data by name · Get and set values · A dictionary as a record · Check and loop Lesson 12 · 3 项必做任务 · ★★★ 视频
- 项目 Project: Text adventure A dictionary inside a dictionary · Is there a door? · Follow a list of directions · Play for real 项目 · ★★★★
Part 6 You build: Project: Hangman
- 规划与伪代码 Plan before you code · Decomposition · Abstraction · Structured English Lesson 13 · 3 项必做任务 · ★★ 视频
- 错误与测试 Three kinds of error · Syntax errors · Runtime errors · Logic errors Lesson 14 · 3 项必做任务 · ★★★ 视频
- 综合应用 The plan · Handy built-ins for lists · A pattern you will reuse: count items that pass a test Lesson 15 · 3 项必做任务 · ★★★ 视频
- 项目 Project: Hangman Plan first · Build a string letter by letter · Stop as soon as you know · The game loop 项目 · ★★★★
阅读与资源
- Python 简史 Where Python came from · Why the funny name · Built for people to read · Python today 阅读与资源
- Python 用来做什么 What people build with Python · Websites and apps · Data, AI, and science · Automation 阅读与资源
- 更多学习资源 边玩边练 · 阅读与参考 · 本站更多课程 · 小提示 阅读与资源
- 设置你的电脑 Run Python on your own computer · Step 1 — Install Python · Step 2 — Install VS Code · Step 3 — Add the Python extension 阅读与资源
Open the Python reference
Every topic in one place, with short examples you can run.
深入学习入口
- freeCodeCamp —— 学 Python 免费、动手实践的 Python 认证课程
- PyChallenger 通过一个个小挑战来学 Python
- CodeCombat 玩一款真正的游戏来学编程
- Python 官方教程 python.org 出品的清晰、免费、分步教程
- Python for Everybody(免费课程) Dr. Chuck 广受好评的入门课程
- Visual Studio Code 在自己电脑上写 Python 的免费编辑器
- A-Level 计算机科学(本站) 把 Python 学得更深,面向剑桥考试
- AP 计算机科学原理(本站) 用 Python 学计算的大思想