Book Description
About This Book
“Python Programming” covers all essential Python knowledge. You can learn complete primary skills of Python fast and easily. The book includes more than 80 practical examples for beginners and includes tests & answers for the college exam, the engineer certification exam, and the job interview exam.
Source Code is Available
This book provides source code for reference; you can reference the source code for better study, or copy the source code to your favorite editor to test the programs.
Table of Contents
Chapter 1 Start Python
What is Python?
First Python Program
The Shell Prompt
Configure Editor
Variables
Variables & Comment
Arithmetic Operator
Assignment Operators
Comparison Operators
Logical Operators
Conditional Operator
Convert Data Type
Triple Quotes
Exercise: Ticket Fare
Summary
Chapter 2 Statement
If Statement
If-else Statement
Indentation
If-elif-Statement
For-In Loops
for variable in range( )
While Loops
Continue
Break Statement
Input Texts (1)
Input Texts (2)
Pass Statement
Exercise: Traffic Light
Summary
Chapter 3 Function
Math Function
ceil( ) & floor( )
pow ( ) & sqrt ( )
Max ( ) & Min ( )
abs( ) & round( )
Custom Function
Function with Arguments
Global & Local Variable
Global Variable inside Function
Return
Main Function
List all functions in module
Exercise: Circle Area
Summary
Chapter 4 Data Structures
List
List Functions
Know More List
Tuple
Tuple Functions
Set
Set Functions
Dictionary
Dictionary Functions
Data Structure Review
Exercise: Four Colors
Summary
Chapter 5 Strings
Operation Strings
Escape Characters
Testing Functions
Searching Functions
Formatting Functions
Stripping Functions
Splitting Functions
String Functions (1)
String Functions (2)
Regular Expressions
Regular Expression in Python
Exercise: Check Your Input
Summary
Chapter 6 Input & Output
Format String
File Directory
Open File
Read file
Write File
Append Text to File
Renew Some Text
Open Web Page
Exercise: Process a File
Summary
Chapter 7 Module & Exception
Module
Import Module (1)
Import Module (2)
Built-in Module
Exceptions
Catch Exceptions
Finally
Debug
Exercise: Three Flowers
Summary
Chapter 8 Class & Object
Class Definition
Object Declaration
Another Object
Inheritance
Overriding Method
Polymorphism
Exercise: Rose is Red
Summary
Appendix Python Summary Charts
Appendix Django Basic
Django Introduction
Install Django
Test Django
Creating Project
Project Structure
Start up Server
Preview Web Page
Create a View File
Create an URL File
View the Web Page
Template
Template Path
Modify view.py
View the Web Page
Appendix Tests & Answers
Tests
Answers
Source Code is Available
中文:
书名:Python Programming, For Beginners, Quick Start Guide!: Python Language Crash Course Tutorial
关于本书
《Python编程》涵盖了所有基本的Python知识。您可以快速轻松地学习完整的Python基本技能。这本书收录了80多个面向初学者的实践案例,包括大学考试、工程师认证考试和求职面试考试的考试和答案。
源代码可用
本书提供了源代码以供参考;您可以参考源代码以便更好地学习,或者将源代码复制到您喜欢的编辑器中以测试程序。
目录表
第1章启动Python
什么是巨蟒?
第一个Python程序
外壳提示符
Configure Editor
Variables
显示变量(&A)
算术运算符
赋值操作符
比较运算符
逻辑运算符
条件运算符
转换数据类型
三重引号
锻炼:票价
Summary
Chapter 2 Statement
IF语句
If-Else语句
缩进
IF-ELIF-语句
For-in循环
对于范围内的变量()
While循环
Continue
Break Statement
输入文本(1)
输入文本(2)
护照声明
练习:红绿灯
Summary
Chapter 3 Function
数学函数
CEIL()和AMP;FLOOR()
pow ( ) & sqrt ( )
最大()和最小()
abs( ) & round( )
自定义函数
带参数的函数
Global & Local Variable
函数内部的全局变量
Return
主要功能
列出模块中的所有函数
练习:圆形区域
Summary
第4章数据结构
List
列表函数
了解更多列表
Tuple
元组函数
Set
集合函数
词典
词典功能
数据结构回顾
练习:四种颜色
Summary
Chapter 5 Strings
操作字符串
转义字符
测试功能
Searching Functions
格式化函数
Stripping Functions
拆分函数
字符串函数(1)
String Functions (2)
正则表达式
Python中的正则表达式
练习:检查您的输入
Summary
第六章投入与产出
格式字符串
文件目录文件目录
Open File
Read file
写入文件文件
Append Text to File
续订一些文本
打开网页
练习:处理文件
Summary
第7章模块和例外(&A)
Module
Import Module (1)
Import Module (2)
内置模块
例外情况
Catch 例外情况
Finally
Debug
练习:三朵花
Summary
第八章分类对象(&A)
Class Definition
Object Declaration
Another Object
Inheritance
Overriding Method
多态
练习:玫瑰是红色的
Summary
附录:Python摘要图表
附录Django Basic
姜戈游戏攻略
安装Django
测试Django
Creating Project
项目结构
启动服务器
Preview Web Page
Create a View File
Create an URL File
查看网页
Template
路径模板模板
修改view.py
查看网页
附录测试和答案(&A)
Tests
Answers
源代码可用
评论前必须登录!
注册