{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 4.1函数"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"images/ch4/1.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"函数是<font color=Red>__可以重复使用的、实现特定功能__</font>的一组程序语句,可以通过<font color=Red>__函数名__</font>进行调用,并通过传递不同<font color=Red>__参数__</font>获得不同的<font color=Red>__返回值__</font>。\n",
" \n",
"函数是<font color=Red>__模块化程序设计__</font>的基础,不仅可以实现<font color=Red>__代码重用__</font>,还可以保证代码的<font color=Red>__一致性和可扩展性__</font>。\n",
"\n",
"本章通过实例讲解函数的定义、调用、参数传递、变量作用域和函数返回值等相关概念。同时简单介绍了匿名函数和递归函数的概念与应用、Python内置函数以及代码重用的实现方法。"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}