Cover
Title Page
Copyright Page
Contents
Preface
Acknowledgements
Keywords
Syntax
Chapter 1 An Introduction to Python
1.1 Introduction
1.2 Origin of a Computer
1.3 Python Editor – Navigation
1.4 Computer Systems
1.5 Program Debugging: Syntax Errors vs. Semantic Errors
1.6 Procedural vs. Object-Oriented Programming
1.7 Python Programming Language
1.8 The IDLE Python Development Environment
1.9 Python Programming Language Computational Thinking
1.10 What is an Algorithm?
1.11 Python Data Types
1.11.1 Numeric Data Types
1.11.2 Setting the Data Type
1.11.3 Setting the Specific Data Type
1.12 Escape Sequences
Review Questions
Chapter 2 Python Operators & Expressions, Strings, Lists
2.1 Python Expression
2.2 Python Operator
2.2.1 Python Arithmetic Operators
2.2.2 Python Assignment Operators
2.2.3 Python Comparison Operators
2.2.4 Python Logical Operators
2.2.5 Python Identity Operators
2.2.6 Python Membership Operators
2.2.7 Python Bitwise Operators
2.3 Variables and Assignment
2.4 Strings
2.4.1 String Literals
2.4.2 String Concatenation
2.4.3 String Length
2.4.4 String Methods
2.4.5 Strings
2.4.6 String Formatted Output
2.4.7 Multiple Values
2.4.8 Formatted Output
2.5 List
2.5.1 Python List Type
2.6 Objects and Classes
2.7 Python Standard Library
Review Questions
Chapter 3 Imperative Programming
3.1 Introduction to Imperative Programming
3.2 Function
3.3 Types of Functions
3.4 Python - Built-in Modules
3.5 print() Function
3.6 eval() Function
3.7 User-Defined Function & Assignments -Parameter Passing
3.7.1 Calling a Function
3.7.2 Function without Arguments
3.7.3 Passing Parameter to Function
3.7.4 The Return Statement in Function
3.7.5 Default Argument Values
3.7.6 Global and Local Variables in Functions
3.8 Advantages of User-Defined Functions
Review Questions
Chapter 4 Python File Handling
4.1 Files and Folders
4.2 Python Files
4.3 Text Data
4.3.1 Opening a File
4.3.2 Writing Text to a File
4.3.3 Reading a Text from a File
4.3.4 Closing a File
4.4 File Handling Functions
4.4.1 Opening a File
4.4.2 Reading a File
4.4.3 Create a New File
4.4.4 Writing into a File
4.4.5 Closing a File
4.4.6 Delete a File
4.5 Exception Handling (Errors)
4.5.1 Raise an Exception
Review Questions
Chapter 5 Python Control Structures
5.1 Execution Control Structures
5.2 Decision Control
5.2.1 The if Statement
5.2.2 if-else
5.2.3 Nested if
5.2.4 if-elif-else
5.3 for Loop
5.4 Iteration Patterns – Two-Dimensional List
5.5 Nested for Loop
5.6 while Loop
5.7 More Loop Patterns
5.8 Additional Iteration Control Statements
5.8.1 Break
5.8.2 Continue
5.8.3 Pass
Review Questions
Chapter 6 Python Modules
6.1 Container
6.2 Randomness - Module
6.2.1 Random randint() Method
6.2.2 Dictionaries
6.3 Other Built-in Container Types
6.4 Character Encoding and Strings
Review Questions
Chapter 7 Python Oops
7.1 Python Namespaces
7.2 Encapsulation in Functions
7.3 Global vs Local Namespaces
7.4 Exception Flow Control
7.5 Modules as Namespaces
Review Questions
Chapter 8 Python Programming Practicals
8.1 To Convert the Given Temperature from Fahrenheit to Celsius and Vice Versa Depending upon User’s Choice
8.2 To Calculate Total Marks, Percentage and Grade of a Student
8.3 To Find the Area of Rectangle, Square, Circle and Triangle using Functions
8.4 To Display the First n Terms of Fibonacci Series
8.5 To Find Factorial of the Given Number
8.6 To Count the Number of Even and Odd Numbers from n Numbers
8.7 To Calculate the Number of Upper and Lower Case Letters for the String
8.8 To Check the Given String is Palindrome or Not
8.9 To Find Sum of the Entire Items in a Dictionary
8.10 To Construct the Pattern, using a Nested Loop
8.11 Simple Analysis Listing
References
Glossary
Test Yourself
Worksheets
Question Bank
Model Question Papers
Index