0%

The one-stop resource for all your Python queries

Powerful and flexible, Python is one of the most popular programming languages in the world. It's got all the right stuff for the software driving the cutting-edge of the development world—machine learning, robotics, artificial intelligence, data science, etc. The good news is that it’s also pretty straightforward to learn, with a simplified syntax, natural-language flow, and an amazingly supportive user community. The latest edition of Python All-in-One For Dummies gives you an inside look at the exciting possibilities offered in the Python world and provides a springboard to launch yourself into wherever you want your coding career to take you.

These 7 straightforward and friendly mini-books assume the reader is a beginning programmer, and cover everything from the basic elements of Python code to introductions to the specific applications where you'll use it. Intended as a hands-on reference, the focus is on practice over theory, providing you with examples to follow as well as code for you to copy and start modifying in the "real world"—helping you get up and running in your area of interest almost right away. This means you'll be finishing off your first app or building and remote-controlling your own robot much faster than you can believe.

  • Get a thorough grounding in the language basics
  • Learn how the syntax is applied in high-profile industries
  • Apply Python to projects in enterprise
  • Find out how Python can get you into hot careers in AI, big data, and more

Whether you're a newbie coder or just want to add Python to your magic box of tricks, this is the perfect, practical introduction—and one you'll return to as you grow your career.

Table of Contents

  1. Cover
  2. Title Page
  3. Copyright
  4. Introduction
    1. About This Book
    2. Foolish Assumptions
    3. What to Buy
    4. Icons Used in This Book
    5. Beyond the Book
    6. Where to Go from Here
  5. Book 1: Getting Started
    1. Chapter 1: Starting with Python
    2. Why Python Is Hot
    3. Choosing the Right Python
    4. Tools for Success
    5. Writing Python in VS Code
    6. Using Jupyter Notebook for Coding
    7. Chapter 2: Interactive Mode, Getting Help, and Writing Apps
    8. Using Python's Interactive Mode
    9. Creating a Python Development Workspace
    10. Creating a Folder for Your Python Code
    11. Typing, Editing, and Debugging Python Code
    12. Writing Code in a Jupyter Notebook
    13. Chapter 3: Python Elements and Syntax
    14. The Zen of Python
    15. Introducing Object-Oriented Programming
    16. Discovering Why Indentations Count, Big Time
    17. Using Python Modules
    18. Chapter 4: Building Your First Python Application
    19. Opening the Python App File
    20. Typing and Using Python Comments
    21. Understanding Python Data Types
    22. Working with Python Operators
    23. Creating and Using Variables
    24. Understanding What Syntax Is and Why It Matters
    25. Putting Code Together
  6. Book 2: Understanding Python Building Blocks
    1. Chapter 1: Working with Numbers, Text, and Dates
    2. Calculating Numbers with Functions
    3. Still More Math Functions
    4. Formatting Numbers
    5. Grappling with Weirder Numbers
    6. Manipulating Strings
    7. Uncovering Dates and Times
    8. Accounting for Time Zones
    9. Working with Time Zones
    10. Chapter 2: Controlling the Action
    11. Main Operators for Controlling the Action
    12. Making Decisions with if
    13. Repeating a Process with for
    14. Looping with while
    15. Chapter 3: Speeding Along with Lists and Tuples
    16. Defining and Using Lists
    17. What's a Tuple and Who Cares?
    18. Working with Sets
    19. Chapter 4: Cruising Massive Data with Dictionaries
    20. Understanding Data Dictionaries
    21. Creating a Data Dictionary
    22. Looping through a Dictionary
    23. Data Dictionary Methods
    24. Copying a Dictionary
    25. Deleting Dictionary Items
    26. Having Fun with Multi-Key Dictionaries
    27. Chapter 5: Wrangling Bigger Chunks of Code
    28. Creating a Function
    29. Commenting a Function
    30. Passing Information to a Function
    31. Returning Values from Functions
    32. Unmasking Anonymous Functions
    33. Chapter 6: Doing Python with Class
    34. Mastering Classes and Objects
    35. Creating a Class
    36. Creating an Instance from a Class
    37. Giving an Object Its Attributes
    38. Giving a Class Methods
    39. Understanding Class Inheritance
    40. Chapter 7: Sidestepping Errors
    41. Understanding Exceptions
    42. Handling Errors Gracefully
    43. Being Specific about Exceptions
    44. Keeping Your App from Crashing
    45. Adding an else to the Mix
    46. Using try … except … else … finally
    47. Raising Your Own Exceptions
  7. Book 3: Working with Libraries
    1. Chapter 1: Working with External Files
    2. Understanding Text and Binary Files
    3. Opening and Closing Files
    4. Reading a File’s Contents
    5. Looping through a File
    6. Reading and Copying a Binary File
    7. Conquering CSV Files
    8. Converting from CSV to Objects and Dictionaries
    9. Chapter 2: Juggling JSON Data
    10. Organizing JSON Data
    11. Understanding Serialization
    12. Loading Data from JSON Files
    13. Dumping Python Data to JSON
    14. Chapter 3: Interacting with the Internet
    15. Seeing How the Web Works
    16. Chapter 4: Libraries, Packages, and Modules
    17. Understanding the Python Standard Library
    18. Exploring Python Packages
    19. Importing Python Modules
    20. Making Your Own Modules
  8. Book 4: Using Artificial Intelligence
    1. Chapter 1: Exploring Artificial Intelligence
    2. AI Is a Collection of Techniques
    3. Current Limitations of AI
    4. Chapter 2: Building a Neural Network
    5. Understanding Neural Networks
    6. Building a Simple Neural Network in Python
    7. Building a Python Neural Network in TensorFlow
    8. Chapter 3: Doing Machine Learning
    9. Learning by Looking for Solutions in All the Wrong Places
    10. Creating a Machine-Learning Network for Detecting Clothes Types
    11. Visualizing with MatPlotLib
    12. Learning More Machine Learning
    13. Chapter 4: Exploring AI
    14. Limitations of the Raspberry Pi and AI
    15. Adding Hardware AI to the Raspberry Pi
    16. AI in the Cloud
    17. AI on a Graphics Card
    18. Where to Go for More AI Fun in Python
  9. Book 5: Doing Data Science
    1. Chapter 1: Understanding the Five Areas of Data Science
    2. Working with Big, Big Data
    3. Cooking with Gas: The Five-Step Process of Data Science
    4. Chapter 2: Exploring Big Data
    5. Introducing NumPy, Pandas, and MatPlotLib
    6. Doing Your First Data Science Project
    7. Chapter 3: Using Big Data from Google Cloud
    8. What Is Big Data?
    9. Understanding Google Cloud and BigQuery
    10. Reading the Medicare Big Data
    11. Looking for the Most Polluted City in the World on an Hourly Basis
  10. Book 6: Talking to Hardware
    1. Chapter 1: Introducing Physical Computing
    2. Physical Computing Is Fun
    3. What Is a Raspberry Pi?
    4. Building Projects That Move and Sense the Environment
    5. Sensing the Environment with the Raspberry Pi
    6. Controlling an LED with Python
    7. But Wait, There's More
    8. Chapter 2: No Soldering! Using Grove Connectors for Building
    9. Working with the Grove System
    10. Grove Connectors
    11. Connecting with Grove Cables
    12. Chapter 3: Sensing the World
    13. Understanding I2C
    14. Measuring Oxygen and a Flame
    15. Building a Dashboard on Your Phone with Blynk
    16. Where to Go from Here
    17. Chapter 4: Making Things Move
    18. Exploring Electric Motors
    19. Controlling a DC Motor
    20. Running a Servo Motor
    21. Making a Stepper Motor Step
  11. Book 7: Building Robots
    1. Chapter 1: Introducing Robotics
    2. A Robot Is Not Always Like a Human
    3. Not Every Robot Has Arms or Wheels
    4. Understanding the Main Parts of a Robot
    5. Programming Robots
    6. Chapter 2: Building Your First Python Robot
    7. Introducing the Mars Rover PiCar-B
    8. Assembling the Robot
    9. Testing Your Robot
    10. Chapter 3: Programming Your Robot Rover
    11. Building a Simple, High-Level Python Interface
    12. Making a Single Move with Python
    13. Functions of the RobotInterface Class
    14. The Python Robot Interface Test
    15. Coordinating Motor Movements with Sensors
    16. Making a Python Brain for Our Robot
    17. Overview of the Included Adeept Software
    18. Where to Go from Here
    19. Chapter 4: Using Artificial Intelligence in Robotics
    20. This Chapter’s Projects: Going to the Dogs
    21. Setting Up the First Project
    22. Machine Learning Using TensorFlow
    23. Testing the Trained Network
    24. Taking Cats and Dogs to Our Robot
    25. Setting Up the Second Project
    26. The FindAndChaseTheBall.py Python Program
    27. The Main Program
    28. AI and the Future of Robotics
  12. Index
  13. About the Authors
  14. Connect with Dummies
  15. End User License Agreement
3.16.15.149