Python Fundamentals a Practical Guide for Learning Python, Complete with Real-World Projects for You to Explore
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 hav...
| Main Author: | |
|---|---|
| Other Authors: | , |
| Format: | eBook |
| Language: | English |
| Published: |
Birmingham
Packt Publishing Ltd,
2018.
|
| Subjects: | |
| Online Access: | EBSCOhost Перейти в каталог НБ ТГУ |
Table of Contents:
- Intro; 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 VariablesMultiple 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 ScriptSummary; 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 ReferencesActivity 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 elseThe 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.
