- Häftad (Paperback / softback)
- Antal sidor
- 2nd Edition
- John Wiley & Sons Inc
- 236 x 188 x 46 mm
- Antal komponenter
- 962 g
Du kanske gillar
Python All-in-One For Dummies309
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.
- Skickas inom 7-10 vardagar.
- Gratis frakt inom Sverige över 199 kr för privatpersoner.
KundrecensionerHar du läst boken? Sätt ditt betyg »
John Shovic, PhD, is a computer science faculty member at the University of Idaho specializing in robotics and artificial intelligence. Alan Simpson is a web development professional who has published more than 100 articles and books on technology.
Introduction 1 About This Book 1 Foolish Assumptions 2 What to Buy 2 Icons Used in This Book 4 Beyond the Book 4 Where to Go from Here 5 Book 1: Getting Started 7 Chapter 1: Starting with Python 9 Why Python is Hot 10 Choosing the Right Python 11 Tools for Success 13 Introducing Anaconda and VS Code 14 Installing Anaconda and VS Code 15 Writing Python in VS Code 19 Choosing your Python interpreter 21 Writing some Python code 22 Getting back to VS Code Python 23 Using Jupyter Notebook for Coding 23 Chapter 2: Interactive Mode, Getting Help, and Writing Apps 29 Using Python's Interactive Mode 29 Opening Terminal 30 Getting your Python version 32 Going into the Python Interpreter 32 Entering commands 33 Using Python's built-in help 33 Exiting interactive help 35 Searching for specific help topics online 36 Lots of free cheat sheets 36 Creating a Python Development Workspace 37 Creating a Folder for Your Python Code 39 Typing, Editing, and Debugging Python Code 41 Writing Python code 42 Saving your code 43 Running Python in VS Code 44 Learning simple debugging 45 Using the VS Code Python debugger 46 Writing Code in a Jupyter Notebook 47 Creating a folder for Jupyter Notebook 47 Creating and saving a Jupyter notebook 48 Typing and running code in a notebook 49 Adding Markdown text 49 Saving and opening notebooks 51 Chapter 3: Python Elements and Syntax 53 The Zen of Python 53 Introducing Object-Oriented Programming 56 Discovering Why Indentations Count, Big Time 57 Using Python Modules 59 Understanding the syntax for importing modules 61 Using an alias with modules 62 Chapter 4: Building Your First Python Application 63 Opening the Python App File 64 Typing and Using Python Comments 64 Understanding Python Data Types 66 Numbers 67 Words (strings) 68 Booleans 70 Working with Python Operators 71 Arithmetic operators 71 Comparison operators 72 Boolean operators 73 Creating and Using Variables 74 Creating valid variable names 75 Creating variables in code 75 Manipulating variables 76 Saving your work 78 Running your Python app in VS Code 78 Understanding What Syntax is and Why It Matters 79 Putting Code Together 84 Book 2: Understanding Python Building Blocks 85 Chapter 1: Working with Numbers, Text, and Dates 87 Calculating Numbers with Functions 87 Still More Math Functions 90 Formatting Numbers 93 Formatting with f-strings 93 Showing dollar amounts 94 Formatting percent numbers 95 Making multiline format strings 97 Formatting width and alignment 98 Grappling with Weirder Numbers 100 Binary, octal, and hexadecimal numbers 100 Complex numbers 101 Manipulating Strings 103 Concatenating strings 103 Getting the length of a string 104 Working with common string operators 105 Manipulating strings with methods 107 Uncovering Dates and Times 110 Working with dates 110 Working with times 114 Calculating timespans 116 Accounting for Time Zones 120 Working with Time Zones 122 Chapter 2: Controlling the Action 127 Main Operators for Controlling the Action 127 Making Decisions with if 129 Adding else to your if logic 132 Handling multiple else statements with elif 133 Ternary operations 135 Repeating a Process with for 136 Looping through numbers in a range 136 Looping through a string 138 Looping through a list 139 Bailing out of a loop 140 Looping with continue 141 Nesting loops 142 Looping with while 143 Starting while loops over with continue 145 Breaking while loops with break 146 Chapter 3: Speeding Along with Lists and Tuples 149 Defining and Using Lists 149 Referencing list items by position 150 Looping through a list 151 Seeing whether a list contains an item 152 Getting the length of a list 153 Adding an item to the end of a list 153 Inserting an item into a list 154 Changing an item in a list 155 Combini