How To Code in Python 3

by Lisa Tagliaferri

DescriptionTable of ContentsDetailsHashtagsReport an issue

Book Description

Extremely versatile and popular among developers, Python is a good general-purpose language that can be used in a variety of applications. For those with an understanding of English, Python is a very humanreadable programming language, allowing for quick comprehension. Because Python supports multiple styles including scripting and object-oriented programming, it is considered to be a multi-paradigm language that enables programmers to use the most suitable style to complete a project. Increasingly used in industry, Python offers a lot of potential for those who would like to begin coding while also being a good choice for those looking to pick up an additional programming language.

Learning the key concepts of Python can help you understand how programs work while also imparting foundational logic that can serve you in other domains. Understanding what Python and computer programming can offer you both as a user and as a developer is important as technology is further integrated into daily life.

This open book is licensed under a Creative Commons License (CC BY-NC-SA). You can download How To Code in Python 3 ebook for free in PDF format (5.0 MB).

Table of Contents

 
Python 2 vs Python 3: Practical Considerations
 
How To Install Python 3 and Set Up a Local Programming Environment
 
How To Write Your First Python 3 Program
 
How To Work with the Python Interactive Console
 
How To Write Comments
 
Understanding Data Types
 
An Introduction to Working with Strings
 
How To Format Text
 
An Introduction to String Functions
 
How To Index and Slice Strings
 
How To Convert Data Types
 
How To Use Variables
 
How To Use String Formatters
 
How To Do Math with Operators
 
Built-in Python 3 Functions for Working with Numbers
 
Understanding Boolean Logic
 
Understanding Lists
 
How To Use List Methods
 
Understanding List Comprehensions
 
Understanding Tuples
 
Understanding Dictionaries
 
How To Import Modules
 
How To Write Modules
 
How To Write Conditional Statements
 
How To Construct While Loops
 
How To Construct For Loops
 
How To Use Break, Continue, and Pass Statements when Working with Loops
 
How To Define Functions
 
How To Use *args and **kwargs
 
How To Construct Classes and Define Objects
 
Understanding Class and Instance Variables
 
Understanding Inheritance
 
How To Apply Polymorphism to Classes
 
How To Use the Python Debugger
 
How To Debug Python with an Interactive Console
 
How To Use Logging
 
How To Port Python 2 Code to Python 3
 

Book Details

Subject
Computer Science
Publisher
DigitalOcean
Published
2018
Pages
459
Edition
1
Language
English
ISBN13 Digital
9780999773017
ISBN10 Digital
0999773011
PDF Size
5.0 MB
License
CC BY-NC-SA

Related Books

Invent Your Own Computer Games with Python
Invent Your Own Computer Games with Python teaches you how to program in the Python language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the examples. Games include Guess the Number, Hangman, Tic Tac Toe, and Reversi. This book also has an introduction to making games with 2D graph...
Programming for Computations - Python
This book presents computer programming as a key method for solving mathematical problems. This second edition of the well-received book has been extensively revised: All code is now written in Python version 3.6 (no longer version 2.7). In addition, the two first chapters of the previous edition have been extended and split up into five new chapte...
Coffee Break Python Slicing
Puzzle-based learning is an active learning technique. With code puzzles, you will learn faster, smarter, and better. Coffee Break Python Slicing is all about growing your Python expertise - one coffee at a time. The focus lies on the important slicing technique to access consecutive data ranges. Understanding slicing thoroughly is crucial for y...
Think Python
If you want to learn how to program, working with Python is an excellent way to start. This hands-on guide takes you through the language a step at a time, beginning with basic programming concepts before moving on to functions, recursion, data structures, and object-oriented design. This second edition and its supporting code have been updated for...
Managing Risk and Information Security
Examine the evolving enterprise security landscape and discover how to manage and survive risk. While based primarily on the author's experience and insights at major companies where he has served as CISO and CSPO, the book also includes many examples from other well-known companies and provides guidance for a management-level audience. Managing...
Think Bayes
If you know how to program with Python and also know a little about probability, you're ready to tackle Bayesian statistics. With this book, you'll learn how to solve statistical problems with Python code instead of mathematical notation, and use discrete probability distributions instead of continuous mathematics. Once you get the math out of the ...