Python Programming : A Modern Approach

Book description

Python is a popular and extremely efficient programming language that has gained fame over the last few years. The language supports many paradigms and can be used in the context of procedural, object-oriented, and even functional programming. Python Programming: A Modern Approach provides an in-depth introduction to the Python language and helps readers master python fundamentals before moving on to applying them in the real world. The book introduces the necessary components, building blocks and gradually advances to the library components.

Table of contents

  1. Cover
  2. About Pearson
  3. Title
  4. Copyright
  5. Contents (1/2)
  6. Contents (2/2)
  7. Preface
  8. Chapter 0 Introducing Python
    1. 0.1 About Python
    2. 0.2 History – Origins of Python
    3. 0.3 Features of Python – Why Choose Python?
      1. 0.3.1 Simple
      2. 0.3.2 Easy to Learn
      3. 0.3.3 Free and Open Source
      4. 0.3.4 High-level Language
      5. 0.3.5 Portable
      6. 0.3.6 Interpreted
      7. 0.3.7 Object Oriented
      8. 0.3.8 Extensible
      9. 0.3.9 Embeddable
      10. 0.3.10 Extensive Libraries
    4. 0.4 Who Uses Python?
    5. 0.5 What Can I Do with Python?
      1. 0.5.1 Systems Programming
      2. 0.5.2 GUIs
      3. 0.5.3 Internet Scripting
      4. 0.5.4 Component Integration
      5. 0.5.5 Database Programming
      6. 0.5.6 Rapid Prototyping
      7. 0.5.7 Numeric and Scientific Programming
    6. 0.6 Installing
      1. 0.6.1 Installation
    7. 0.7 Python 2 and Python 3 Installation on Windows
      1. 0.7.1 DOS Prompt
      2. 0.7.2 For Windows Vista
      3. 0.7.3 For Windows 7 and 8
      4. 0.7.4 Running Python Prompt on Windows
    8. 0.8 Installation on Mac OS X
    9. 0.9 Installation on Gnu/linux
    10. 0.10 The First Program
      1. 0.10.1 Command Line Mode/Interactive Mode
      2. 0.10.2 Script Mode
      3. 0.10.3 When to Use?
  9. Chapter 1 Variables, Types, Operations and Operators
    1. 1.1 Variables
    2. 1.2 Logical and Physical Line
      1. 1.2.1 Indentation
      2. 1.2.2 Summary
    3. 1.3 Typed Language
      1. 1.3.1 Statically Typed Language
      2. 1.3.2 Dynamically Typed Language
      3. 1.3.3 Strongly Typed Language
      4. 1.3.4 Weakly Typed Language
      5. 1.3.5 Variable Names and Keywords
      6. 1.3.6 Keywords
    4. 1.4 Types
      1. 1.4.1 Literals
    5. 1.5 Numbers – int, float, complex
      1. 1.5.1 IDLE Basics
    6. 1.6 Text – String
      1. 1.6.1 Representation of String Values
      2. 1.6.2 Making Strings
      3. 1.6.3 Object
    7. 1.7 Length of the String
    8. 1.8 String Slicing
      1. 1.8.1 Methods
      2. 1.8.2 Finding Truths
      3. 1.8.3 Find and Count
      4. 1.8.4 Join and Combine
      5. 1.8.5 Case and Alignment
    9. 1.9 Truth – Boolean
    10. 1.10 Comments
    11. 1.11 Operators
      1. 1.11.1 Operators in Python
      2. 1.11.2 Arithmetic
    12. 1.12 Relational Operators
      1. 1.12.1 Logical Operators
    13. 1.13 Bitwise Operators
      1. 1.13.1 Operator Evaluation
      2. 1.13.2 Keyboard Input
      3. 1.13.3 Type Conversion
  10. Chapter 2 Data Structures
    1. 2.1 Lists
      1. 2.1.1 Syntactically
      2. 2.1.2 Accessing the Element from the List
      3. 2.1.3 Slicing a List
    2. 2.2 Copy
      1. 2.2.1 I am in ! – The Membership
      2. 2.2.2 Lists are Mutable Sequences
      3. 2.2.3 Deleting Items in a List and Deleting List
      4. 2.2.4 Methods
      5. 2.2.5 Searching
    3. 2.3 Tuples
      1. 2.3.1 So You Might be Thinking What Tuples are Good for?
    4. 2.4 Dictionary
      1. 2.4.1 Creating a Dictionary
      2. 2.4.2 Dictionary Operations
      3. 2.4.3 Dictionary Methods
      4. 2.4.4 Aliasing and Copying
    5. 2.5 Sets
      1. 2.5.1 Modifying a Set
      2. 2.5.2 Removing Items from the Set
      3. 2.5.3 Set Operations
      4. 2.5.4 Set’s Membership
    6. 2.6 Conclusion
      1. 2.6.1 The None Type
  11. Chapter 3 Control Flow
    1. 3.1 Alternative Execution
    2. 3.2 Chained Conditionals
    3. 3.3 Nested Conditionals
    4. 3.4 For
    5. 3.5 For Tuple
      1. 3.5.1 For Dictionary
    6. 3.6 The Range() Function
    7. 3.7 While
      1. 3.7.1 The General Format of a While Loop
    8. 3.8 The Guessing Game
      1. 3.8.1 Infinite Loop – Your Server
    9. 3.9 Control Transfer Statements
      1. 3.9.1 Continue
      2. 3.9.2 Break
    10. 3.10 List Comprehensions
    11. 3.11 Pass Statement – Placeholder
  12. Chapter 4 Functions
    1. 4.1 Positional Arguments
    2. 4.2 Keyword Arguments
    3. 4.3 Specify Default Parameter Values
      1. 4.3.1 Gather the Positional Arguments with*
      2. 4.3.2 Gather Keyword Arguments with**
    4. 4.4 Functions Returning Values – Fruitful Functions
    5. 4.5 Recursion
      1. 4.5.1 Function Illustrating Fibonacci
      2. 4.6 Scope of a Variable
      3. 4.6.1 The Global Statement
      4. 4.6.2 Docstrings
      5. 4.6.3 Uses of _ and __ in Names
      6. 4.6.4 Anonymous Functions: The Lambda() Function
  13. Chapter 5 A Gentle Introduction to Object Oriented Programming
    1. 5.1 The Problem
    2. 5.2 The Solution
    3. 5.3 In Summary
      1. 5.3.1 Classes, Objects, Instances
      2. 5.3.2 The Python Way
    4. 5.4 Python Classes
    5. 5.4.1 Creating Python Classes
    6. 5.5 Methods
      1. 5.5.1 Making It Do Something
      2. 5.5.2 The Self
    7. 5.6 Constructors
      1. 5.6.1 Initializing the Object
      2. 5.6.2 Explaining Yourself
    8. 5.7 Class Variables and Instance Variables
      1. 5.7.1 The Brewing
      2. 5.7.2 The BankAccount
      3. 5.7.3 The Virtual Machine
      4. 5.7.4 A Washing Machine
  14. Chapter 6 Inheritance
    1. 6.1 Basic Inheritance
      1. 6.1.1 Overriding and Super
      2. 6.1.2 Get Help from Your Parent with Super
      3. 6.1.3 Multiple Inheritance
      4. 6.1.4 Polymorphism and Duck Typing
    2. 6.2 Special Methods
      1. 6.2.1 Book Club
      2. 6.2.2 Reverse Adding
      3. 6.2.3 Adding
      4. 6.2.4 Comparative Literature
      5. 6.2.5 Multipath Inheritance
    3. 6.3 Data Hiding – The Private Variables
    4. 6.4 Iterators
    5. 6.5 The Iteration Protocol
    6. 6.6 Generators
      1. 6.6.1 When to Use Classes and Objects Versus Modules
  15. Chapter 7 Exceptions
    1. 7.1 Expect the Unexpected – Exceptions
      1. 7.1.1 Syntax Errors
      2. 7.1.2 Exceptions
      3. 7.1.3 Handling Exceptions
      4. 7.1.4 Writing Your Own Exceptions
      5. 7.1.5 Raising Exceptions
    2. 7.2 Exceptions aren’t Exceptional
    3. 7.3 Exceptions Defining Clean-up Actions
    4. 7.4 Predefined Clean-up Actions
  16. Chapter 8 Modules, Packages and Distribution
    1. 8.1 Packages Small Description about Modularity
    2. 8.2 Sound – A Package
    3. 8.3 Third Party Packages
    4. 8.4 A Brief Tour of Standard Library
      1. 8.4.1 Operating System Interface
      2. 8.4.2 File Wildcards
    5. 8.5 Command Line Arguments
    6. 8.6 Error Output Redirection and Program Termination
    7. 8.7 String Pattern Matching
    8. 8.8 Mathematics
    9. 8.9 Internet Access
    10. 8.10 Dates and Times
    11. 8.11 Data Compression
    12. 8.12 Performance Measurement
    13. 8.13 Quality Control
  17. Chapter 9 GUI Programming with Tkinter
    1. 9.1 Introducing Tkinter
    2. 9.2 What’s Tkinter?
    3. 9.3 Hello, Tkinter
      1. 9.3.1 Our First Tkinter Program
    4. 9.4 Hello, Again
    5. 9.5 Buttons
      1. 9.5.1 Lambda Trick
      2. 9.5.2 Global Variables
    6. 9.6 Tic-tac-toe
      1. 9.6.1 Correcting the Problems
  18. Chapter 10 Turtle Graphics
    1. 10.1 Turtle Graphics
      1. 10.1.1 Move and Draw
      2. 10.1.2 Turtle Operations
      3. 10.1.3 Turtle Object
      4. 10.1.4 Simple Graphics
    2. 10.2 The Vagrant
    3. 10.3 The Beautiful Patterns
    4. 10.4 Drawing with Colors
  19. Chapter 11 Regular Expression
    1. 11.1 Introduction
      1. 11.1.1 Basic Patterns
      2. 11.1.2 Basic Examples
      3. 11.1.3 Repetition
      4. 11.1.4 Leftmost and Largest
    2. 11.2 Repetition Examples
      1. 11.2.1 Emails_finder.py
    3. 11.3 Square Brackets
      1. 11.3.1 Findall
      2. 11.3.2 Substitution
  20. Chapter 12 Input and Output
    1. 12.1 Working with Files
    2. 12.2 The Print() Function
  21. Chapter 13 Databases
    1. 13.1 How to Use a Database
    2. 13.2 Introducing SQL
      1. 13.2.1 What Can SQL do?
      2. 13.2.2 Definition Database Table
    3. 13.3 SQL Queries
    4. 13.4 Select Clause
      1. 13.4.1 Select Syntax
    5. 13.5 Select with Where Clause
    6. 13.6 Select with Order by Clause
    7. 13.7 Insert into Statement
    8. 13.8 Update Statement
    9. 13.9 Delete from Statement
    10. 13.10 Working With a Database
    11. 13.11 Python and SQLite
    12. 13.12 Creating an SQLite DB
    13. 13.13 Pulling the Data from the DB–Select
    14. 13.14 Using Where
    15. 13.15 Update and Delete
    16. 13.16 SQLite Database Files
  22. Chapter 14 Testing
    1. 14.1 Unit Testing
      1. 14.1.1 Tests and Testability
      2. 14.1.2 Unit Testing
      3. 14.1.3 How Many Tests Should You Have?
      4. 14.1.4 Commonly Used Methods
      5. 14.1.5 Test Driven Development (TDD)
      6. 14.1.6 How TDD Improves the Quality of Your Code
      7. 14.1.7 How TDD Improves Your Programming Experience
  23. Chapter 15 Python Tutorial Introduction and Scientific Python
    1. 15.1 Python
      1. 15.1.1 Python Versions
      2. 15.1.2 Basic Data Types
      3. 15.1.3 Containers
      4. 15.1.4 Slicing
      5. 15.1.5 List Comprehensions
      6. 15.1.6 Functions
      7. 15.1.7 Classes
      8. 15.1.8 Numpy
      9. 15.1.9 Integer Array Indexing
      10. 15.1.10 Datatypes
      11. 15.1.11 Array Math
      12. 15.1.12 Broadcasting
    2. 15.2 Numpy Documentation
      1. 15.2.1 SciPy
    3. 15.3 Image Operations
      1. 15.3.1 MATLAB Files
      2. 15.3.2 Distance Between Points
      3. 15.3.3 Matplotlib
      4. 15.3.4 Plotting
      5. 15.3.5 Subplots
      6. 15.3.6 Images
  24. Index (1/2)
  25. Index (2/2)

Product information

  • Title: Python Programming : A Modern Approach
  • Author(s): Vamsi Kurama
  • Release date: January 2017
  • Publisher(s): Pearson Education India
  • ISBN: 9789352862061