About This Book "Python Programming" is a textbook for high school and college students; it covers all essential Python language knowledge . You can learn complete primary skills of Python programming fast and easily . The textbook includes a lot of practical examples for beginners and includes exercises for the college final exam, the engineer certification exam, and the job interview exam . "Python Programming" is a useful textbook for beginners . The straightforward definitions, the plain examples, the elaborate explanations and the neat layout feature this helpful and educative book . You will be impressed by its distinctive and tidy writing style . Reading this book is a great enjoyment!
Note This book is only suitable for Python programming beginners, high school students and college students; it is not for the experienced Python programmers .
Source Code 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 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 Hands-on Ticket Fare Summary
Chapter 2 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 Hands-on Traffic Light Summary
Chapter 3 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 Hands-on Circle Area Summary
Chapter 4 List List Functions Know More List Tuple Tuple Functions Set Set Functions Dictionary Dictionary Functions Data Structure Review Hands-on Four Colors Summary
Chapter 6 Format String File Directory Open File Read file Write File Append Text to File Renew Some Text Open Web Page Hands-on Process a File Summary