mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-13 00:01:18 -05:00
48 lines
1.2 KiB
Markdown
48 lines
1.2 KiB
Markdown
---
|
|
id: 5e9a093a74c4063ca6f7c165
|
|
title: Python 简介
|
|
challengeType: 11
|
|
videoId: PrQV9JkLhb4
|
|
bilibiliIds:
|
|
aid: 805597530
|
|
bvid: BV1634y1S7gD
|
|
cid: 409023550
|
|
dashedName: python-introduction
|
|
---
|
|
|
|
# --description--
|
|
|
|
*在视频中我们使用的编辑器工具是在 notebook.ai 这个平台,你也可以选择用其他的平台,比如说 Google Colab 也是一个不错的选择。*
|
|
|
|
更多资源:
|
|
|
|
- <a href="https://github.com/ine-rmotr-curriculum/ds-content-python-under-10-minutes" target="_blank" rel="noopener noreferrer nofollow">在 GitHub 平台的 Notebooks</a>
|
|
- <a href="https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb" target="_blank" rel="noopener noreferrer nofollow">如何使用 Google Colab 来打开 GitHub 上的 Notebooks</a>
|
|
|
|
# --question--
|
|
|
|
## --text--
|
|
|
|
我们如何在 Python 函数中定义代码块?
|
|
|
|
## --answers--
|
|
|
|
我们可以在代码的每个新区块的两侧使用一组大括号。
|
|
|
|
---
|
|
|
|
我们使用缩进,通常是右对齐的 4 个空格。
|
|
|
|
---
|
|
|
|
我们不用指示出代码块。
|
|
|
|
---
|
|
|
|
我们可以使用大括号或缩进来指示出代码块。
|
|
|
|
## --video-solution--
|
|
|
|
2
|
|
|