Table Of ContentPython for Beginners
A smarter way to learn Python and
remember it longer
Arthur T Brooks
Contents
INTRODUCTION
CHAPTER ONE
FIRST THINGS FIRST
CHAPTER TWO
VARIABLES AND VARIABLE RULES
CHAPTER THREE
STRINGS AND METHODS
CHAPTER FOUR
OPERATIONS WITH NUMBERS
CHAPTER FIVE
THE USE OF COMMENTS
CHAPTER SIX
OPERATIONS WITH LISTS
CHAPTER SEVEN
FURTHER OPERATIONS WITH LISTS
CHAPTER EIGHT
WORKING WITH LOOPS
CHAPTER NINE
WORKING WITH IF STATEMENTS
CHAPTER TEN
OPERATIONS INVOLVING DICTIONARIES
CHAPTER ELEVEN
NESTING DICTIONARIES AND LISTS
CHAPTER TWELVE
OPERATIONS INVOLVING USER INPUT AND WHILE LOOPS
CHAPTER THIRTEEN
OPERATIONS USING DEFINED FUNCTIONS
CHAPTER FOURTEEN
OPERATIONS INVOLVING CLASSES
CHAPTER SIXTEEN
OPERATING WITH FILES
CHAPTER SEVENTEEN
MANAGING ERRORS WITH EXCEPTIONS
CHAPTER EIGHTEEN
HOW EVERYTHING COMES TOGETHER IN PROJECTS
CONCLUSION
ANSWERS TO THE EXERCISES
INDEX
-More Python books by Arthur T. Brooks-
Python for Beginners. Learn Data Science the Smart Way
http://www.amazon.com/dp/B085RNT2C8
Copyright 2020 by Arthur T. Brooks - All rights reserved.
The following eBook is reproduced with the goal of providing information that is as accurate and
reliable as possible. The recommendations suggestions contained in these pages are solely for
entertainment purposes.
This declaration is deemed fair and valid by both the American Bar Association and the Committee
of Publishers Association and is legally binding throughout the United States.
Furthermore, the transmission, duplication or reproduction of any of the following work in any form
(including specific information) is illegal. This extends to creating a secondary or tertiary copy of the
work. No record copy of this work can me produced without with the express, written consent from
the publisher. All additional rights reserved.
The information in the following pages is broadly considered to be a truthful and accurate account of
facts and, as such, any inattention, use or misuse of the information in question by the reader will
render any resulting actions solely under his/her purview. There are no instances in which the
publisher or the original author of this work can be deemed liable for any hardship or damages that
may befall them after undertaking information described herein.
Additionally, the information in the following pages is intended only for informational purposes and
should thus be regarded as universal. As befitting its nature, it is presented without assurance
regarding its prolonged validity or interim quality. Trademarks that are mentioned are done without
written consent and can in no way be considered an endorsement from the trademark holder.
INTRODUCTION
Python is one of the simplest programming languages in existence today.
Although you may be trying to learn it for the first time, it is not necessarily
that new. It was created in the 1980s by Guido van Rossum. Since then,
notable companies like Yahoo, Facebook and Google have been using the
language. Its advantage over other programming languages is its simplicity
which the enables those who are venturing into programming for the first
time to learn quickly and execute projects. Apart from this, highly
experienced programmers also find the language handy in the daily practice
of their art.
What this Book is for and What You Can Expect to Learn
This is a high quality, easy to understand, clear and concise non-technical,
guidebook on how to learn Python in 5 days. You are not just going to learn
how to code using Python, but how to understand actual Python itself.
Apart from knowing Python code, you will be able to understand the way
Python works which will enable you to use your creativity to achieve
unlimited innovative tasks.
It is written in a manner that anyone, even a complete novice can learn and
understand how to use Python in real-life situations. It is structured from the
simplest and shortest operations, introducing the more advanced parts of the
language only after you have become familiar with the basic concepts. At
the end of the book, you will realize that you have, without any stressful
self-exertion, become able to not only code in Python, but also think the
way Python thinks.
How to Use this Book
If you follow this book faithfully, 5 days may even be too much time for
you to spend for you to have a working knowledge of Python. However, we
recommend that you follow the 5-day plan in order to maximize what you
are learning by taking the extra time to properly digest the content. To make
the most out of this book, study four chapters each day for the first three
days, and three chapters each for the remaining two days. There are only
eighteen chapters. Each chapter is short, straightforward and easy to
understand, with examples to illustrate the lessons.
At the end of each chapter, there is a chapter summary which recaps what
you have learned in that chapter. More importantly, there are exercises at
the end of each chapter to enable you try your hand on what you have just
learned and make it stick in your mind. The examples and exercises in this
book are based on real-life work situations which will give you a solid
foundation on which to build upon. These initial applications are designed
to ease you in gently, giving you the confidence and knowledge to kickstart
you in the world of programming.
Now this is not a book ‘about’ Python. Instead, it is a Python book. What is
the difference? A book about Python will tell you a lot about Python and
may be even explain just about everything that exists about Python. But you
can finish a book about Python and not be able to use the language. On the
contrary, this is a Python book which teaches you how to understand and
use Python. That is the important difference. It is a practical manual for
learning how to work in Python effectively. To help achieve this goal, it is
strongly advised that you download Python 3 and the recommended text
editor and install them on your system before proceeding to the rest of the
book. How to do this is covered in chapter one of the book.
You learn Python and most other things in life by doing them. The
essence of this guide is to enable you not just read along, but work along
with the book. You can of course simply read the codes and just believe that
they will do what the book says the codes will do. But a better way to learn
is to actually write out the code in your text editor and run it to see whether
what the book says about it is true. Secondly, as you write the code
yourself, you will realize that there are certain aspects of the code like
spacing, indentation, punctuation and so on, that you did not really notice at
a glance but which can affect your outcome tremendously. You should,
therefore, apply your hand to the task yourself and continue to practice
often. It’s true what you were told, practice really does make perfect.
At the end of this book, there are answers to the exercises found in each
chapter. Do not rush to go and check the answers. Instead, try hard to get
the required result by yourself first. The beautiful thing about this language
is that if you write the correct code, you will know because it will produce
the desired output. While these exercises and examples are written to cover
as much as possible of what you have learned, do not limit yourself to them.
Go beyond them. Think of as many real-life problems as you can imagine
and write codes to solve them. It’s an entertaining exercise which let’s you
understand and acknowledge your skills and development.
How the Book is formatted
Codes are not necessarily eye-friendly. This is because they contain a
mixture of symbols, letters and even numerical figures. To make it easier
for your peepers as you read this book, the codes are written in a different
font type from the one used in the body of the book. It is also written in
blue color. The output is written in the same font type as the code and
bolded in orange color.
Again, as you go through the book, you will realize that we are building
progressively on what was learned previously. As a result, sometimes it is
necessary to repeat the code in the previous example or chapter with only a
few modifications here and there to achieve the current result. Where this is
the case, the repeated code is colored green just to help you distinguish it
from whatever is new.
Thanks for buying this book. I really do hope that you enjoy it and it
inspires you. If you do feel that you have gained real value from it then
please take two minutes to leave me an honest review by clicking below.
http://www.Amazon.com/gp/customer-reviews/write-a-review.html?
asin= B07Y8R23CF
It’s quick and easy and it will help others decide if they too could benefit
from the book. Thanks in advance.
I will soon be releasing more high-quality Python related books which I
will offer those on my list either free or at a steep discount for the first 24
hours. Sound interesting?
Join us here!
CHAPTER ONE