Healthy Pragmatic Solutions Inc. Copyright 2018 - All rights reserved.
The contents of this book may not be reproduced, duplicated or transmitted without direct written permission from the author.
Under no circumstances will any legal responsibility or blame be held against the publisher for any reparation, damages, or monetary loss due to the information herein, either directly or indirectly.
Legal Notice:
You cannot amend, distribute, sell, use, quote or paraphrase any part or the content within this book without the consent of the author.
Disclaimer Notice:
Please note the information contained within this document is for educational purposes only. No warranties of any kind are expressed or implied. Readers acknowledge that the author is not engaging in the rendering of legal, financial, medical or professional advice. Please consult a licensed professional before attempting any techniques outlined in this book.
By reading this document, the reader agrees that under no circumstances are is the author responsible for any losses, direct or indirect, which are incurred as a result of the use of information contained within this document, including, but not limited to, errors, omissions, or inaccuracies.
*First Time Audible Listeners.
CLAIM YOUR FREE AUDIO-BOOOK VERSION BELOW
Link: http://python.healthypslife.com/
FREE E-BOOK DOWNLOAD :
http://bit.ly/2yJsyq4
or
http://pragmaticsolutionstech.com/
Use the link above to get instant access to the bestselling E-Book Data Analytics' Guide For Beginners
Table of Contents
Chapter 1
Introduction
Python is a loosely typed object oriented programming language used to perform variety of programming tasks ranging from web development and desktop application development to data science and machine learning etc. Owing to its simplicity of syntax and ease of learning, Python has become one of the leading programming languages of the world. Python was created by Guido van Rossum in late 1980s. This book provides a gateway to in-depth Python programming.
Why Python?
There are several advantages of learning Python. Some of them are as follows:
Python is one of the easiest languages to learn owing to its super simple syntax and loose typing. Unlike other languages, you dont have to learn how to use myriads of bracket types in order specify code blocks. You also dont get end of line semicolon errors. Finally, you also dont have to specify the type of variable while storing data in it. These points might sound trivial to expert programmers, but for a person new to programming they are serious turn-offs.
Python is an open source language which means it can be used to develop, share and distribute applications for commercial as well as non-commercial purposes without any copyright infringements. Furthermore, Pythons large developer community makes it easier to lookup for solutions to the problem.
Python can be used for developing websites. In fact there are some very good Python frameworks such as Django and Flask that make server side web development much easier and robust.
You would have heard the term Data is the future. If data is really the future, then Python is surely the language to learn since most of the data science and machine learning are currently being implemented via Python. There are several machine learning and deep learning libraries such as Sklearn, Tensorflow, Keras that made it simple to develop complex machine learning models.
Important Features of Python
Following are some of the most important features of Python:
Python source code is compiled directly to byte code without any intermediate steps. This makes Python script run on multiple platforms without requiring any additional tool.
Python is 100% object oriented language. Everything in Python is an object. Furthermore, python provides an easy way to create new objects via classes.
- Support for C/C++ Extension
Python code can be further extended in C and C++. Speed of a Python program can be significantly increased this way.
Python is a dynamic language. Values, instead of variables are bound to types. Furthermore, Method and function lookup is performed at runtime.
- Automatic Garbage Collection
Garbage collection is performed automatically in Python. However, gc module can be used to perform garbage collection at any given time.
- Highly Structured Language
Statements, functions, classes, modules and packages and most importantly Pythons indentation based syntax allows developers to write highly structured and readable code.
- Fast and Maintainable Compared to Other Languages
In comparison with other compiled languages, Python is faster, more structured and more maintainable.
About the Book
This book is aimed towards providing in-depth yet simple insight into Python programming language. The book is geared towards beginner as well as advanced readers. The book helps beginners get their feet wet with practical Python. On the other hand, it can be used by expert users as a reference to different basic and advanced Python concepts.
All the important Python concepts have been grouped into chapters. A chapter contains theoretical information about particular Python concepts along with their implementation in the form of Python script. To get the most of this book, readers are suggested to first thoroughly understand the concept and then practice the code.
Whats next?
In the next chapter we will set up the environment required to run python script. We will install different software needed to run the scripts in this book. Happy Coding!!!
Chapter 2
Environment Setup
In this chapter we will install the software that we are going to use to run our Python programs. There are several options available in this regard. You can simply install core Python and use a text editor like notepad to write Python programs. These programs can then be run via command line utilities. The other option is to install an Integrated Develop Environment (IDE) for Python. IDE provides a complete programming environment including Python installation, Editors and debugging tools. Most of the advanced programmers take the IDE route for Python development. We are also going to take the same route.
Anaconda is the IDE that we are going to use throughout this book. Anaconda is light, easy to install and comes with variety of development tools. Anaconda has its own command line utility to install third party software. And the good thing is that with Anaconda, you dont have to separately install Python environment.
Downloading and Installing Anaconda
Follow these steps to download and install anaconda. In this section we will show the process of installing Anaconda for windows. The installation process remains almost same for Linux and Mac.