ENGLISH

Python Crash Course: A Hands-On, Project-Based Introduction to Programming, 2nd Edition

Book information

Publisher
Inc., No Starch Press
Year
2019
ISBN
1593279280, 9781593279288, 9781593276034, 1593276036, 2015018135
Language
english
Format
PDF
Filesize
10 MB (10716470 bytes)
Edition
2
Pages
\674
Time added
2021-06-07 15:49:18

Description

Title Page Copyright Page About the Author About the Technical Reviewer Dedication BRIEF CONTENTS CONTENTS IN DETAIL PREFACE TO THE SECOND EDITION ACKNOWLEDGMENTS INTRODUCTION Who Is This Book For? What Can You Expect to Learn? Online Resources Why Python? PART I: BASICS 1 GETTING STARTED Setting Up Your Programming Environment Python on Different Operating Systems Running a Hello World Program Troubleshooting Running Python Programs from a Terminal Summary 2 VARIABLES AND SIMPLE DATA TYPES What Really Happens When You Run hello_world.py Variables Strings Numbers Comments The Zen of Python Summary 3 INTRODUCING LISTS What Is a List? Changing, Adding, and Removing Elements Organizing a List Avoiding Index Errors When Working with Lists Summary 4 WORKING WITH LISTS Looping Through an Entire List Avoiding Indentation Errors Making Numerical Lists Working with Part of a List Tuples Styling Your Code Summary 5 IF STATEMENTS A Simple Example Conditional Tests if Statements Using if Statements with Lists Styling Your if Statements Summary 6 DICTIONARIES A Simple Dictionary Working with Dictionaries Looping Through a Dictionary Nesting Summary 7 USER INPUT AND WHILE LOOPS How the input() Function Works Introducing while Loops Using a while Loop with Lists and Dictionaries Summary 8 FUNCTIONS Defining a Function Passing Arguments Return Values Passing a List Passing an Arbitrary Number of Arguments Storing Your Functions in Modules Styling Functions Summary 9 CLASSES Creating and Using a Class Working with Classes and Instances Inheritance Importing Classes The Python Standard Library Styling Classes Summary 10 FILES AND EXCEPTIONS Reading from a File Writing to a File Exceptions Storing Data Summary 11 TESTING YOUR CODE Testing a Function Testing a Class Summary PART II: PROJECTS PROJECT 1: ALIEN INVASION 12 A SHIP THAT FIRES BULLETS Planning Your Project Installing Pygame Starting the Game Project Adding the Ship Image Refactoring: The _check_events() and _update_screen() Methods Piloting the Ship A Quick Recap Shooting Bullets Summary 13 ALIENS! Reviewing the Project Creating the First Alien Building the Alien Fleet Making the Fleet Move Shooting Aliens Ending the Game Summary 14 SCORING Adding the Play Button Leveling Up Scoring Summary PROJECT 2: DATA VISUALIZATION 15 GENERATING DATA Installing Matplotlib Plotting a Simple Line Graph Random Walks Rolling Dice with Plotly Summary 16 DOWNLOADING DATA The CSV File Format Mapping Global Data Sets: JSON Format Summary 17 WORKING WITH APIs Using a Web API Visualizing Repositories Using Plotly The Hacker News API Summary PROJECT 3: WEB APPLICATIONS 18 GETTING STARTED WITH DJANGO Setting Up a Project Starting an App Making Pages: The Learning Log Home Page Building Additional Pages Summary 19 USER ACCOUNTS Allowing Users to Enter Data Setting Up User Accounts Allowing Users to Own Their Data Summary 20 STYLING AND DEPLOYING AN APP Styling Learning Log Deploying Learning Log Summary AFTERWORD A INSTALLATION AND TROUBLESHOOTING Python on Windows Python on macOS Python on Linux Python Keywords and Built-in Functions B TEXT EDITORS AND IDEs Customizing Sublime Text Settings Other Text Editors and IDEs C GETTING HELP First Steps Searching Online Internet Relay Chat Slack Discord D USING GIT FOR VERSION CONTROL Installing Git Making a Project Ignoring Files Initializing a Repository Checking the Status Adding Files to the Repository Making a Commit Checking the Log The Second Commit Reverting a Change Checking Out Previous Commits Deleting the Repository INDEX

Similar books