Skip to main content

How To Code in Python 3: Introduction

How To Code in Python 3
Introduction
    • Notifications
    • Privacy
  • Project HomeHow To Code in Python 3
  • Projects
  • Learn more about Manifold

Notes

Show the following:

  • Annotations
  • Resources
Search within:

Adjust appearance:

  • font
    Font style
  • color scheme
  • Margins
table of contents
  1. Introduction
  2. Python 2 vs Python 3: Practical Considerations
  3. How To Install Python 3 and Set Up a Local Programming Environment on Ubuntu 16.04
  4. How To Install Python 3 and Set Up a Local Programming Environment on macOS
  5. How To Install Python 3 and Set Up a Local Programming Environment on Windows 10
  6. How To Install Python 3 and Set Up a Local Programming Environment on CentOS 7
  7. How To Install Python 3 and Set Up a Programming Environment on an Ubuntu 16.04 Server
  8. How To Write Your First Python 3 Program
  9. How To Work with the Python Interactive Console
  10. How To Write Comments
  11. Understanding Data Types
  12. An Introduction to Working with Strings
  13. How To Format Text
  14. An Introduction to String Functions
  15. How To Index and Slice Strings
  16. How To Convert Data Types
  17. How To Use Variables
  18. How To Use String Formatters
  19. How To Do Math with Operators
  20. Built-in Python 3 Functions for Working with Numbers
  21. Understanding Boolean Logic
  22. Understanding Lists
  23. How To Use List Methods
  24. Understanding List Comprehensions
  25. Understanding Tuples
  26. Understanding Dictionaries
  27. How To Import Modules
  28. How To Write Modules
  29. How To Write Conditional Statements
  30. How To Construct While Loops
  31. How To Construct For Loops
  32. How To Use Break, Continue, and Pass Statements when Working with Loops
  33. How To Define Functions
  34. How To Use *args and **kwargs
  35. How To Construct Classes and Define Objects
  36. Understanding Class and Instance Variables
  37. Understanding Inheritance
  38. How To Apply Polymorphism to Classes
  39. How To Use the Python Debugger
  40. How To Debug Python with an Interactive Console
  41. How To Use Logging
  42. How To Port Python 2 Code to Python 3

Introduction

Why Learn To Code

Software and technology are becoming increasingly integrated into our everyday lives, allowing us to accomplish tasks, navigate to destinations, make purchases, and stay connected with friends. Because of how pervasive software now is to the human experience, it is important for all of us to learn some of the key foundational elements of computer programming. While some may choose to study computer science as part of their formal education, everyone can benefit from an understanding of algorithmic thinking and computational processes. Learning how the software that we use on a daily basis is made can allow us as end users to evaluate how and why these applications are developed, enabling us to think critically about these tools and how to improve them.

Just like any other product, computer programs are designed and developed by people who have unconscious biases, make errors, and may not be considering all aspects of a problem they are trying to solve. Though development teams may do thorough testing and work to create sophisticated and useful programs, they do not always meet the needs and expectations of all users. While not everyone needs to learn to code complex programs, learning how coding works can help shape the future of technology and increase the number of stakeholders, decision makers, and knowledge producers who can work to build better software for everyone.

Some of us may choose to solve challenging problems within the technology sector, but for those of us not working in computer science, a programming background can still be a great asset to our professional fields. Computer programming provides many applications across domains, and can help us solve problems in specialities such as medicine, economics, sociology, history, and literature, to name a few. By integrating technology’s methodologies into our own fields, we can leverage computational logic and software design and development practices in our work. When we synthesize knowledge across spheres and collaborate with people from different backgrounds, we can innovate in new, more inclusive ways that can enact meaningful impact across many communities.

Why Learn Python

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 human-readable 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.

As you work through this book, you will be able to increase your awareness of computer programming, improve your logical thinking, and eventually become a producer of software. Being able to create software that runs is a very rewarding endeavor, and can help you serve those around you by increasing their access and empowering them to become collaborators. The more communities involved in the creation of software development, the more communities there will be whose needs are served by software.

How To Use This Book

This book is designed to be used in a way that makes sense for you. While it is arranged to ramp up an emerging developer, do not be constrained by the order: feel free to move throughout the book in a way that makes sense for you. Once you are familiar with the concepts, you can continue to use the book as a source of reference.

If you use the book in the order it is laid out, you’ll begin your exploration in Python by understanding the key differences between Python 3 and the previous versions of the language. From there, you’ll set up a programming environment for your relevant local or server-based system, and begin by learning general Python code structure, syntax, and data types. Along the way, you’ll gain a solid grounding in computational logic within Python, which can help you learn other programming languages. While the beginning of the book focuses on scripting in Python, the end of the book will take you through object-oriented coding in Python, which can make your code more modular, flexible, and complex without repetition. By the end of the book, you’ll learn how to debug your Python code and finally how to port Python code across versions.

When you are done with the book, we encourage you to look at project-based tutorials to put your knowledge into play while creating projects that can help you solve problems. While you are working on these projects, you can continue to refer to the chapters in this book as reference material.

As part of your learning process and once you feel comfortable, we recommend that you contribute to an open-source project to improve programs and drive greater access via software and technical documentation pull requests or repository maintenance. Our community is bigger than just us and building software together can make sure that everyone has an opportunity to participate in the technology we use every day.

Annotate

Next Chapter
Python 2 vs Python 3: Practical Considerations
PreviousNext
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Powered by Manifold Scholarship. Learn more at
Opens in new tab or windowmanifoldapp.org