Python All-In-One for Dummies

advertisement

Python All-In-One for Dummies

DESCRIPTION

Python All-In-One for Dummies
Python All-In-One for Dummies


Thanks to its flexibility, Python has grown to become one of the most popular programming languages in the world. Developers use Python in app development, web development, data science, machine learning, and even in coding education classes.

There's almost no type of project that Python can't make better. From creating apps to building complex websites to sorting big data, Python provides a way to get the work done. Python All-in-One For Dummies offers a starting point for those new to coding by explaining the basics of Python and demonstrating how it’s used in a variety of applications.

Covers the basics of the language

  • Explains its syntax through application in high-profile industries
  • Shows how Python can be applied to projects in enterprise
  • Delves into major undertakings including artificial intelligence, physical computing, machine learning, robotics and data analysis

advertisement

TABLE OF CONTENTS

Introduction 1

About This Book 1

Foolish Assumptions 2

Icons Used in This Book 2

Beyond the Book 3

Where to Go from Here 3

Book 1: Getting Started with Python 5

Chapter 1: Starting with Python 7

Why Python is Hot 8

Choosing the Right Python 9

Tools for Success 11

An excellent, free learning environment 12

Installing Anaconda and VS Code 13

Writing Python in VS Code 17

Choosing your Python interpreter 19

Writing some Python code 20

Getting back to VS Code Python 21

Using Jupyter Notebook for Coding 21

Chapter 2: Interactive Mode, Getting Help, Writing Apps 27

Using Python Interactive Mode 27

Opening Terminal 28

Gettingyour Python version 28

Going into the Python Interpreter 30

Entering commands 30

Using Python’s built-in help 31

Exiting interactive help 33

Searching for specific help topics online 33

Lots of free cheat sheets 34

Creating a Python Development Workspace 34

Creating a Folder for your Python Code 37

Typing, Editing, and Debugging Python Code 39

Writing Python code 40

Saving your code 41

Running Python in VS Code 41

Simple debugging 42

The VS Code Python debugger 43

Writing Code in a Jupyter Notebook 45

Creating a folder for Jupyter Notebook 45

Creating and saving a Jupyter notebook 46

Typing and running code in a notebook 46

Adding some Markdown text 47

Saving and opening notebooks 48

Chapter 3: Python Elements and Syntax 49

The Zen of Python 49

Object-Oriented Programming 53

Indentations Count, Big Time 54

Using Python Modules 56

Syntax for importing modules 58

Using an alias with modules 59

Chapter 4: Building Your First Python Application 61

Open the Python App File 62

Typing and Using Python Comments 63

Understanding Python Data Types 64

Numbers 65

Words (strings) 66

True/false Booleans 68

Doing Work with Python Operators 69

Arithmetic operators 69

Comparison operators 70

Boolean operators 71

Creating and Using Variables 72

Creating valid variable names 73

Creating variables in code 74

Manipulating variables 75

Saving your work 76

Running your Python app in VS Code 76

What Syntax is and Why It Matters 78

Putting Code Together 82


Download full PDF in Comment section

advertisement

2 Comments

Previous Post Next Post