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

Computer Science
ISBN13 Digital
ISBN10 Digital
PDF Size
5.0 MB

Related Books

How To Code in Node.js
Node.js is a popular open-source runtime environment that can execute JavaScript outside of the browser. The Node runtime is commonly used for back-end web development, leveraging its asynchronous capabilities to create networking applications and web servers. Node is also a popular choice for building command line tools. In this book, you will ...
How To Code in Go
This book is designed to introduce you to writing programs with the Go programming language. You'll learn how to write useful tools and applications that can run on remote servers, or local Windows, macOS, and Linux systems for development. The topics that it covers include how to: - Install and set up a local Go development environment on Wind...
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...
Snake Wrangling for Kids
Python for Kids is a lighthearted introduction to the Python language and to programming in general, complete with illustrations and kid-friendly examples. We begin with the basics of how to install Python and write simple commands. In bite-sized chapters, you'll discover the essentials of Python, including how to use Python's extensive standard li...