网站首页 软件下载 游戏下载 翻译软件 电子书下载 电影下载 电视剧下载 教程攻略
书名 | 零基础学PYTHON编程实战 |
分类 | 教育考试-考试-计算机类 |
作者 | 林富荣 |
出版社 | 电子工业出版社 |
下载 | |
简介 | 内容推荐 本书通过经典案例,由浅入深地介绍了 Python 及其应用。本书注重素质的培养,注重练 习的实用性、可操作性和趣味性。本书章节安排科学、合理,可引导读者学习、巩固、综合 运用 Python。本书内容新颖、图文并茂、实例丰富、通俗易懂,可供互联网开发人员、财务管理人员、 人力资源管理人员、运营管理人员,以及培训机构等相关人员阅读,亦可作为初学者的入门教材。 目录 基础篇 .............................................................................. 1 第一章 Python 概述 ........................................................................ 2 1.1 Python 的起源 ............................................................... 2 1.2 GPL 协议 ..................................................................... 4 1.3 Python 为什么流行 ......................................................... 5 1.4 Sublime Text ............................................................... 8 第二章 Python 环境的搭建 ............................................................... 9 2.1 2.2 初级实战篇 安装 Python .................................................................. 9 安装 Sublime Text ...................................................... 14 ..................................................................... 21 第三章 Python 的第一行代码 ......................................................... 3.1 第一行代码 ............................................................... 3.2 注释 ........................................................................ 3.3 引号 ........................................................................ 3.4 缩进 ........................................................................ 3.5 Unicode .................................................................. 3.6 转义字符 .................................................................. 3.7 运行 Python 文件 ......................................................... 第四章 变量................................................................................. 4.1 变量的赋值 ............................................................... 4.2 整数 ........................................................................ 34 4.3 浮点数 ..................................................................... 36 4.4 复数 ........................................................................ 37 4.5 字节串 ..................................................................... 37 4.6 布尔值 ..................................................................... 39 4.7 输入 ........................................................................ 40 4.8 输出 ........................................................................ 41 4.9 格式化输出 ............................................................... 42 4.10 ASCII 码 .................................................................. 44 4.11 将数据转换为字符串 ................................................... 45 第五章 运算................................................................................. 46 5.1 加法 ........................................................................ 46 5.2 减法 ........................................................................ 47 5.3 乘法 ........................................................................ 48 5.4 除法 ........................................................................ 49 5.5 整除 ........................................................................ 51 5.6 取余 ........................................................................ 51 5.7 次方 ........................................................................ 52 5.8 按位与 ..................................................................... 53 5.9 按位或 ..................................................................... 54 5.10 按位异或 .................................................................. 55 5.11 按位取反 .................................................................. 56 5.12 按位左移 .................................................................. 57 5.13 按位右移 .................................................................. 58 5.14 逻辑运算 .................................................................. 59 第六章 数据结构........................................................................... 63 6.1 序列 ........................................................................ 63 6.2 列表 ........................................................................ 71 6.3 栈 ........................................................................... 78 6.4 队列 ........................................................................ 79 6.5 元组 ........................................................................ 80 6.6 字典 ........................................................................ 85 6.7 集合 ........................................................................ 91 第七章 字符串.............................................................................. 99 7.1 字符串拼接 ............................................................... 99 7.2 截取字符串 ............................................................... 101 7.3 字符串长度 ............................................................... 103 7.4 字符串字节数 ............................................................ 103 7.5 分割字符串 ............................................................... 105 7.6 合并字符串 ............................................................... 106 7.7 字符串大小写转换 ...................................................... 107 7.8 统计字符串 ............................................................... 109 7.9 检索字符串位置 ......................................................... 110 7.10 字符串对齐 ............................................................... 111 7.11 检索字符串 ............................................................... 113 7.12 格式化输出 ............................................................... 114 7.13 其他函数 .................................................................. 115 中级实战篇 .................................................................. 117 第八章 流程控制........................................................................... 118 8.1 条件语句 .................................................................. 118 8.2 断言语句 .................................................................. 121 8.3 循环语句 .................................................................. 123 8.4 pass 语句 .................................................................. 126 第九章 函数和 lambda 表达式 ......................................................... 128 9.1 函数是什么 ............................................................... 128 9.2 zip() 函数 .................................................................. 129 9.3 reversed() 函数 ......................................................... 130 9.4 sorted() 函数 ............................................................ 131 9.5 位置参数 .................................................................. 132 9.6 关键字参数 ............................................................... 133 9.7 默认参数 .................................................................. 134 9.8 return 语句 ............................................................... 135 9.9 全局变量 .................................................................. 136 9.10 局部变量 .................................................................. 138 9.11 局部函数 .................................................................. 139 9.12 lambda 表达式 ......................................................... 140 9.13 import ..................................................................... 140 第十章 类和对象........................................................................... 142 10.1 面向对象 .................................................................. 142 10.2 类的创建 .................................................................. 142 10.3 类的实例化 ............................................................... 144 10.4 self 的用法 ............................................................... 145 10.5 变量 ........................................................................ 146 10.6 静态方法 .................................................................. 148 10.7 封装 ........................................................................ 150 10.8 继承 ........................................................................ 151 10.9 方法重写 .................................................................. 153 10.10 调用父类的构造方法 ................................................ 154 10.11 多态 ..................................................................... 155 10.12 枚举 ..................................................................... 156 第十一章 类的属性和方法............................................................... 158 11.1 __init__() 方法 ......................................................... 158 11.2 __str__() 方法 ......................................................... 159 11.3 __call__() 方法 ......................................................... 160 11.4 __len__() 方法 ......................................................... 161 11.5 __del__() 方法 ......................................................... 162 11.6 __dir__() 方法 ......................................................... 163 11.7 生成器 ..................................................................... 164 异常处理机制.................................................................. 166 12.1 语法错误 .................................................................. 166 12.2 try...except ............................................................... 168 12.3 try...except...else ...................................................... 170 12.4 try...except...finally ................................................... 172 模块和包........................................................................ 174 13.1 import ..................................................................... 174 13.2 import as ............................................................... 176 13.3 from import as ......................................................... 177 13.4 import 自定义模块 ................................................... 178 文件操作........................................................................ 180 14.1 文件路径 .................................................................. 180 14.2 删除文件 .................................................................. 181 14.3 打开文件 .................................................................. 182 14.4 写入文件数据 ............................................................ 184 14.5 tell() 函数 ............................................................... 185 14.6 with...as .................................................................. 186 高级实战篇 .................................................................. 189 第十五章 Word 的基础操作 ............................................................ 190 15.1 安装 python-docx 模块 ............................................. 190 15.2 创建标题 .................................................................. 192 15.3 创建文本内容 ............................................................ 193 15.4 创建列表 .................................................................. 194 15.5 创建表格 .................................................................. 196 15.6 创建图片 .................................................................. 197 Excel 的基础操作 ............................................................ 199 16.1 安装库 ..................................................................... 199 16.2 创建 Excel 表单 ......................................................... 201 16.3 创建文本内容 ............................................................ 202 16.4 创建样式 .................................................................. 204 第十六章 实战项目:员工在职证明................................................... 206 第十七章 附录 A 进制转换表 ........................................................................ 211 附录B Pandas命令.....................................................................212 附录C Python库........................................................................214 |
随便看 |
|
霍普软件下载网电子书栏目提供海量电子书在线免费阅读及下载。