وبلاگ بلیان

Python Programming: 4th Edition

معرفی کتاب «Python Programming: 4th Edition» نوشتهٔ Singh A.، منتشرشده توسط نشر Independently published در سال 2024. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Python Programming: 4th Edition» در دستهٔ بدون دسته‌بندی قرار دارد.

Welcome to the world of Python programming! Whether you are a seasoned developer or just starting your journey into the realm of coding, this book aims to be your comprehensive guide to mastering Python, a versatile and powerful programming language. In this book, I will embark on a journey through the fundamentals of Python programming, covering everything from basic syntax to advanced topics. Whether you are looking to build simple scripts or complex applications, Python has the tools and libraries to help you bring your ideas to life. Chapter 1 introduces you to the basics of Python, including how to install Python on your system, set up your development environment, and run your first Python program. I will explore Python's simple and elegant syntax, which prioritizes readability and makes it easy to write and understand code. Chapter 2 delves into the fundamental building blocks of Python programming, including variables, data types, operators, and control flow structures. Understanding these concepts is crucial for writing effective and efficient Python code. Chapter 3 explores functions, one of the most powerful features of Python. You will learn how to define and call functions, work with arguments and return values, and leverage the flexibility of Python's function capabilities. Chapter 4 takes a deep dive into data structures, including lists, tuples, dictionaries, and sets. These data structures are essential for organizing and manipulating data in Python programs, and mastering them will greatly enhance your coding skills. Chapter 5 covers object-oriented programming (OOP) in Python, a paradigm that allows you to model real-world entities as objects with attributes and behaviors. You will learn how to create classes and objects, implement inheritance and polymorphism, and design robust and maintainable Python code using OOP principles. Chapter 6 explores file handling and input/output (I/O) operations in Python. You will learn how to read from and write to files, handle exceptions gracefully, and work with the file system using Python's built-in functions and libraries. Chapter 7 introduces you to modules and packages, which enable you to organize your code into reusable and shareable components. You will learn how to create and import modules, install and manage packages using package managers like pip, and leverage the vast ecosystem of third-party libraries available for Python. Chapter 8 dives into advanced topics such as regular expressions, concurrency, multiprocessing, GUI Programming and networking. These topics will equip you with the skills to tackle more complex programming tasks and build scalable and efficient Python applications. Throughout the book, you will find hands-on examples, exercises with 101 Python Programs, to reinforce your understanding of Python programming concepts and techniques. Whether you prefer to learn by reading, coding, or a combination of both, there is something here for everyone. By the end of this book, you will have a solid foundation in Python programming and the confidence to tackle a wide range of programming challenges. Whether you aspire to become a professional Python developer, pursue a career in data science or machine learning, or simply want to automate tasks and solve problems more efficiently, Python has the tools and resources to help you succeed. So, without further ado, let's embark on this exciting journey into the world of Python programming. Whether you are a novice or an experienced programmer, there is always something new to learn and discover in the ever-evolving landscape of Python. Happy coding! Python Programming AKNOWLEDGEMENT PREFACE Python Programming CONTENTS Chapter 1 Getting Started with Python The difference between "Python Implementation" vs. "Python distribution" vs. Python Features/Advantages of Using Python Language Limitations/Disadvantages of Python Language 1. Difficulty in Using Other Languages 2. Weak Language in Mobile Computing 3. Gets Slow in Speed 4. Run-time Errors 5. Underdeveloped Database Access Layers Varieties of Python Language: Some Jargon Chapter 2 Installing Python https://www.python.org/downloads/ python i Download the latest version for Windows How to Test the Python in Microsoft Windows Chapter 3 Interacting with Python 1. Interactive Interpreter 2. Script from the Command-line 3. Integrated Development Environment IDLE: Pythons Integrated Development Environment (IDE) Recently added |L IDLE (Python 3.9 64-bit) |L Python 3.9 Module Docs (64-bit) B? Python 3.9 Manuals (64-bit) The Python Shell Window Chapter 4 Python Syntax Multiple Statements on a Single Line Multi-line statements The print Statement The print() function Multi-Line Output. Important: Python 3.x The raw_input() Function raw_input(/prompt/) The input() Function Chapter 5 Variables and Data Types Strings 1. Integer (int) Octal literals (base 8) Hexadecimal literals (base 16) Binary literals (base 2) Converting Integers to their String Representation 2. Floating-point numbers 3. Complex numbers Conversion of Number Type Numeric Conversion Functions Numeric Function Definitions int(x) float(x) long(x) complex(reaZ, [imagf) Collection Functions Date and Time Exercises Chapter 6 Python Basic Operators Arithmetic Operators Assignment Operators Multiple Assignment Statement Relational or Comparison Operators Logical Operators not Bit Manipulation Operators Chapter 7 Pythons Built-in Functions The input() Function The range() function The print() Function abs() max() type() len() Chapter 8 Conditional Statements pass The assert Statement The if-else Ternary Operator else: Chapter 9 Loops Using the range() Function with the for Loop Using pass Statement Using a break statement Using continue Statement Nested loops Chapter 10 User-Defined Functions function body/statements return [expression] Function Varieties Arguments Returning values The return Statement Default arguments and keyword arguments The global Statement Functions and Namespaces Chapter 11 Useful Modules Importing modules Changing module names Location Time module sleep Timing things os module - Working with files and directories Changing the directory Getting the current directory Getting the files in a directory Changing and deleting files Copying files More with os.path os.walk Quitting your program Zip files For getting files from the internet Sound Finding Modules: The Path The exec Statement Chapter 12 Classes and Object-Oriented Programming Classes in ^Python Semantics Class in Python How to define Python classes Creating and Using Objects Garbage Collection Python Constructors Customizing Objects init Method del Method repr Method str Method Further topics Polymorphism Built-in Functions isinstance(oi/ect, type) super(type) Exercises Chapter 13 Exceptions Exceptions versus Syntax Errors Raising an Exception Exception Handling: The try and except Block The else Clause Cleaning Up After Using finally Built-in Exceptions exception AttributeError exception NotlmplementedError A Digression Chapter 14 Multithreaded Programming Starting a New Thread Creating Thread Using Threading Module Synchronizing Threads Multithreaded Priority Queue Chapter 15 Text Files in Python File Semantics File Organization and Structure The open Function file.closed file.mode file.name The close() Method The write() Method The read() Method File Positions Renaming and Deleting Files The remove() Method Directories in Python The mkdir() Method The chdir() Method The getcwd() Method The rmdir() Method File & Directory Related Methods Exercises Chapter 16 Regular Expressions What are various methods of Regular Expressions? 6. re.compile() What are the most commonly used operators? Output: Output: Chapter 17 String, List & Dictionary Creating a string (and special characters) >>> u"\u0041" Strings are immutable Formatter >>> print("%s %s" % ("a", "b")) Operators Methods Methods for string manipulation Methods that return a modified version of the string Methods to find position of substrings Methods to build or decompose a string LISTS Quick example Difference between appendQ and extendQ index insert remove POP count sort reverse Slicing List comprehension ... ifi%2==0: Filtering Lists Lists as Stacks Lists as Queues > > > import copy Inserting items into a sorted list MAPPINGS AND DICTIONARIES Quick example Methods to create new dictionary Combining dictionaries iterators Chapter 18 Python Pandas 2. Open and run the installer NumPy - Introduction Operations using NumPy Customizing NumPy NumPy - Ndarray Object Sr.No. Data Types & Description Data Type Objects (dtype) Example 2 NumPy - Ways of Array Creation numpy.empty Sr.No. Parameter & Description numpy.zeros Parameter & Description numpy.ones Shape Dtype Order Introduction to Data Structures Python Pandas - Series Create a Series from ndarray 12 c Create a Series from diet Create a Series from Scalar Accessing Data from Series with Position Retrieve Data Using Label (Index) Python Pandas DataFrame pandas.DataFrame S.No Parameter & Description Create DataFrame Create an Empty DataFrame Create a DataFrame from Lists Create a DataFrame from Diet of ndarrays I Lists Create a DataFrame from List of Diets Column Selection Column Addition Column Deletion Row Selection, Addition, and Deletion Selection by Label Selection by integer location Slice Rows Addition of Rows Deletion of Rows Python Pandas - Panel pandas.Panel() Parameter Description Create Panel Create an Empty Panel Selecting the Data from Panel Using Items Using major_axis Using minor_axis Data Transferring Saving A pandas Dataframe As A CSV Create dataframe Data Transferring - SQLite Databases and DataFrame Id Name Country Active Reading results into a pandas DataFrame Id Name Country Active df.to_sql("daily_flights", conn, if_exists="replace") index id Departure arrival number route_id Chapter 19 GUI Programming using Tkinter Label component Options of Label Changing label properties grid Spanning multiple rows or columns Spacing Entry component Getting text Deleting text Inserting text Button component lambda trick Frame component Images Canvas component Naming things, changing them, moving them, and deleting them Text component Statement Description Scale component GUI Events Description Key events Note Event examples Title bar Disabling things Getting the state of a component Destroying things Stopping a window from being closed Updating Dialogs Menu bars New windows pack StringVar The Python Imaging Library Using images other than GIFs with Tkinter Chapter 20 Database Connectivity import MySQLdb Description INSERT Operation READ Operation Update Operation DELETE Operation Performing Transactions COMMIT Operation ROLLBACK Operation Disconnecting Database Procedure Handling Errors Warning Error InterfaceError DatabaseError DataError OperationalError IntegrityError InternalError ProgrammingError Chapter 21 The Python Library Overview of the Python Library tarfile xml.dom urllib2 CGIHTPPServer asyncore Chapter 22 101 Python Programs
دانلود کتاب Python Programming: 4th Edition