وبلاگ بلیان

PYTHON FUNDAMENTALS : a practical guide for learning python, complete with real-world ... projects for you to explore

معرفی کتاب «PYTHON FUNDAMENTALS : a practical guide for learning python, complete with real-world ... projects for you to explore» نوشتهٔ Ryan Marvin, Mark Ng'ang'a, Amos Omondi، منتشرشده توسط نشر Packt Publishing Limited در سال 2018. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «PYTHON FUNDAMENTALS : a practical guide for learning python, complete with real-world ... projects for you to explore» در دستهٔ بدون دسته‌بندی قرار دارد.

With an interesting mix of theory and practicals, explore Python and its features, and progress from beginner to being skilled in this popular scripting language Key Features A comprehensive introduction to the world of Python programming Paves an easy-to-follow path for you to navigate through concepts Filled with over 90 practical exercises and activities to reinforce your learning Book Description After a brief history of Python and key differences between Python 2 and Python 3, you'll understand how Python has been used in applications such as YouTube and Google App Engine. As you work with the language, you'll learn about control statements, delve into controlling program flow and gradually work on more structured programs via functions. As you settle into the Python ecosystem, you'll learn about data structures and study ways to correctly store and represent information. By working through specific examples, you'll learn how Python implements object-oriented programming (OOP) concepts of abstraction, encapsulation of data, inheritance, and polymorphism. You'll be given an overview of how imports, modules, and packages work in Python, how you can handle errors to prevent apps from crashing, as well as file manipulation. By the end of this book, you'll have built up an impressive portfolio of projects and armed yourself with the skills you need to tackle Python projects in the real world. What you will learn Use control statements Manipulate primitive and non-primitive data structures Use loops to iterate over objects or data for accurate results Write encapsulated and succinct Python functions Build Python classes using object-oriented programming Manipulate files on the file system (open, read, write, and delete) Who this book is for Python Fundamentals is great for anyone who wants to start using Python to build anything from simple command-line programs to web applications. Prior knowledge of Python isn't required. Table of Contents Introducing Python Data Types Control Statements Functions Lists and Tuples Dictionaries and Sets Object-Oriented Programming Modules, Packages, and File Operations Error Handling Preface Introducing Python Introduction Python 2 Versus Python 3 Working with the Python Interactive Shell Exercise 1: Checking our Python Installation Exercise 2: Working with the Python Interpreter Activity 1: Working with the Python Shell Writing and Running Simple Scripts Exercise 3: Creating a Script Running a File Containing Invalid Commands Exercise 4: Passing User Arguments to Scripts Activity 2: Running Simple Python Scripts Python Syntax Variables Values Exercise 5: Checking the Type of a Value Type Conversion Exercise 6: Assigning Variables Exercise 7: Using Variables Multiple Assignment Activity 3: Using Variables and Assign Statements Naming Identifiers and Reserved Words Exercise 8: Python Keywords Python Naming Conventions Activity 4: Variable Assignment and Variable Naming Conventions User Input, Comments, and Indentations User Input from the Keyboard Passing in a Prompt to the input Function Using Different Input Data Types in your Program Exercise 9: Fetching and Using User Input Comments Indentation Exercise 10: The Importance of Proper Indentation Activity 5: Fixing Indentations in a Code Block Activity 6: Implementing User Input and Comments in a Script Summary Data Types Introduction Numerical Data Types of Numbers Exercise 11: Converting Between Different Types of Number Systems Operators Order of Operations Activity 7: Order of Operations Activity 8: Using Different Arithmetic Operators Strings String Operations and Methods Indexing Slicing Activity 9: String Slicing Length String Formatting String Methods Activity 10: Working with Strings Escape Sequences Exercise 12: Using Escape Sequences Activity 11: Manipulating Strings Lists List Operations Exercise 13: List References Activity 12: Working with Lists Booleans Comparison Operators Logical Operators Membership Operators Activity 13: Using Boolean Operators Summary Control Statements Introduction Control Statements Program Flow Control Statement The if Statement Exercise 14: Using the if Statement Activity 14: Working with the if Statement The while Statement Exercise 15: Using the while Statement Exercise 16: Using while to Keep a Program Running Activity 15: Working with the while Statement while Versus if Loops The for Loop Exercise 17: Using the for Loop Using else The range Function Activity 16: The for loop and the range Function Nesting Loops Exercise 18: Using Nested Loops Activity 17: Nested Loops Breaking Out of Loops The break Statement The continue Statement The pass Statement Activity 18: Breaking out of Loops Summary Functions Introduction Built-In Functions User-Defined Functions Calling a Function Global and Local Variables Exercise 19: Defining Global and Local Variables Function Return Using main() Function Arguments Required Arguments Keyword Arguments Default Arguments Variable Number of Arguments Activity 19: Function Arguments Anonymous Functions Exercise 20: Creating a Lambda Function Activity 20: Using Lambda Functions Summary Lists and Tuples Introduction List Syntax List Methods list.append(item) list.extend(iterable) list.insert(index, item) list.remove(item) list.pop([index]) list.clear() list.index(item [, start [, end]]) list.count(item) list.sort(key=None, reverse=False) list.reverse() list.copy() Activity 21: Using the List Methods List Comprehensions Tuple Syntax Exercise 21: Creating a Tuple Accessing Tuple Elements Indexing Exercise 22: Accessing Tuple Elements Using Indexing Slicing Exercise 21: Creating a Tuple Accessing Tuple Elements Indexing Exercise 23: Accessing Tuple Elements Using Slicing Tuple Methods Activity 22: Using Tuple Methods Summary Dictionaries and Sets Introduction Working with Dictionaries Activity 23: Creating a Dictionary Exercise 24: Adding Data to a Dictionary Exercise 25: Reading Data from a Dictionary Exercise 26: Iterating Through Dictionaries Checking for the Existence of Particular Keys Additional Dictionary Attributes dict.update() dict.clear() and dict.pop() dict.copy() dict.popitem() dict.setdefault() dict.fromkeys() Activity 24: Arranging and Presenting Data Using Dictionaries Ordered Dictionaries Activity 25: Combining Dictionaries The Basics of Sets Exercise 27: Creating Sets Exercise 28: Adding Data to a Set Exercise 29: Reading Data from a Set Activity 26: Building a Set Exercise 30: Removing Data from a Set Set Operations Union Intersection Difference Subsets Equality Update Methods Frozen Sets Activity 27: Creating Unions of Elements in a Collection Summary Object-Oriented Programming Introduction A First Look at OOP OOP in Python Defining a Class in Python Exercise 31: Creating a Class Instantiating an Object Exercise 32: Instantiating a Person Object Adding Attributes to an Object The __init__ Method Exercise 33: Adding Attributes to a Class Activity 28: Defining a Class and Objects Methods in a Class Defining Methods in a Class Exercise 34: Creating a Method for our Class Passing Arguments to Instance Methods Exercise 35: Passing Arguments to Instance Methods Exercise 36: Setting Instance Attributes within Instance Methods Activity 29: Defining Methods in a Class Class Versus Instance Attributes Exercise 37: Declaring a Class with Instance Attributes Class Attributes Exercise 38: Extending our Class with Class Attributes Exercise 39: Implementing a Counter for Instances of a Class Activity 30: Creating Class Attributes Class Versus Instance Methods Exercise 40: Creating Instance Methods Class Methods Exercise 41: Testing our Factory Method Exercise 42: Accessing Class Attributes from within Class Methods Encapsulation and Information Hiding Activity 31: Creating Class Methods and Using Information Hiding Class Inheritance Exercise 43: Implementing Class Inheritance Overriding __init__() Exercise 44: Overriding the __init__ Method to Add an Attribute Commonly Overridden Methods Activity 32: Overriding Methods Multiple Inheritance Exercise 45: Implementing Multiple Inheritance Activity 33: Practicing Multiple Inheritance Summary Modules, Packages, and File Operations Introduction Defining Modules Exercise 46: Creating Modules Imports and Import Statements Exercise 47: Importing Modules Modules and Packages The Module Search Path Standard Python Modules Activity 34: Inspecting Modules Packages Absolute Imports Relative Imports Activity 35: Listing the Resources Defined in a Package or Module Activity 36: Using Resources in a Module File Operations The file Object The file Object Methods Reading and Writing to Files The open() Method Exercise 48: Creating, Reading, and Writing to Files The with Context Manager Activity 37: Performing File Operations Handling Structured Data Working with CSV Data Activity 38: Working with Files Working with JSON Data Summary Error Handling Introduction Errors and Exceptions in Python How to Raise Exceptions Built-In Exceptions SyntaxError ImportError KeyError TypeError AttributeError IndexError NameError FileNotFoundError Activity 39: Identifying Error Scenarios Handling Errors and Exceptions Exercise 49: Implementing the try...except Block Exercise 50: Implementing the try...except...else Block Exercise 51: Implementing the finally Keyword Activity 40: Handling Errors Custom Exceptions Implementing Your Own Exception Class Activity 41: Creating Your Own Custom Exception Class Summary Appendix A Index _GoBack _GoBack _GoBack _GoBack Python Fundamentals takes you from zero experience to a complete understanding of key concepts, edge cases, and using Python for real-world application development. You'll move progressively from the basics to working with larger complex applications. After completing this book, you'll have the skills you need to dive into an existing ...
دانلود کتاب PYTHON FUNDAMENTALS : a practical guide for learning python, complete with real-world ... projects for you to explore