PYTHON PROGRAMMING

The Crash Course for Python Projects

Learn the Secrets of Machine Learning, Data Science

Analysis and Artificial Intelligence.

Introduction to Deep Learning for Beginners

Sivakumar Munusami

COPYRIGHT

All rights reserved. No part of this book may be reproduced in whole or in part, Stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, distribution of this book via internet or otherwise, without the prior written consent of the publishers or author. Please purchase only authorized electronic or paperback edition, and do not participate in or encourage electronic piracy of copyrighted material.

CONTENT

Prologue

Chapter 1:  What is Python Language?

Chapter 2:  Why is Python Language so popular?

Chapter 3:  Why the name Python?

Chapter 4:  Why learn Python Language?

Chapter 5:  Which companies are using python?

Chapter 6:  History of Python Language

Chapter 7:  Features of Python Language

Chapter 8:  Why Python is different from other languages?

Chapter 9:  How download Python Language?

Chapter 10:  How Install Python Language?

Chapter 11:  What is Python IDE?

Chapter 12:  What is Code Editor?

Chapter 13:  How Setup Python Environment?

Chapter 14:  Python Application (Framework)

Chapter 15:  Python Program Basic Fundamental

• ​ Variable

• ​ Keyword

• ​ Numbers

• ​ String

• ​ Typecasting

• ​ Operator

1. Arithmetic Operator

2. Relational Operator

3. Assignment Operator

4. Logical Operator

5. Bitwise Operator

6. Membership Operator

7. Identity Operator

• ​ Operator Precedence

• ​ Branching Statement

1. if statement

2. if else statement

3. if-elif-else ladder statement

4. nested if statement

• ​ Looping Statement

1. while loop

2. for loop

• ​ List

• ​ Tuple

• ​ Set

• ​ Dictionary

• ​ Function

• ​ Classes and Object

Chapter 16:  Python Programmes (12 Nos) with Code

1. ​ Find ASCII Value of Character

2. ​ Find Factors of Number

3. ​ Find LCM

4. ​ Find Numbers Divisible by Another Number

5. ​ Find the Factorial of a Number

6. ​ Find the Largest Among Three Numbers

7. ​ Find the Square Root

8. ​ Find the Sum of Natural Numbers

9. ​ Generate a Random Number

10. ​ Multiply Two Matrices

11. ​ Print all Prime Numbers in an Interval

12. ​ Swap Two Variables

Chapter 17:  What is Machine Learning?

Chapter 18:  What is Data Science Analysis?

Chapter 19:  What is Artificial Intelligence?

Chapter 20:  What is Deep Learning?

Conclusion

Prologue

Congratulations on downloading “Python Programming: The Crash Course for Python Projects – Learn the Secrets of Machine Learning, Data Science Analysis and Artificial Intelligence. Introduction to Deep Learning for Beginners” and thank you for doing so.

Do you want to get a job immediately at large companies like Google?  Do you want to buy an expensive Rolls Royce car? Do you want to live a luxury life in a lifetime? Then you need to learn the Python language. Python is not just a word. This is a magic word. This is God's gift to us. Today the world is talking about the glory of Python. 90 percent of software experts write a program using Python language. Python is a high-level language. Writing a program with Python is easy. This is an open source language. It's easy to learn. It is possible to write a small coding and create a great program with Python. New people can easily learn Python. A lot of people are unemployed. If we need to get the job immediately, learn the Python language. When you read the last page of this book, you will learn the full language of Python.

Chapter 1:  What is Python Language?

Python is a world-famous simple, powerful and general purpose computer language. This is an open source language. It is called a high-level language, dynamic language, graphical user interface language, object-oriented language, interpreter language. Guido van Rossum developed Python language in 1991. He was born in the Netherlands and currently living in Belmont-California. He is the best software developer. Python language can easily create complicated programs. Python commands are very simple. It is easy to write a program in Python. It is an open source program available for free. Big companies like Google is using Python language. The Python language runs on the operating system, such as Windows, Linux, UNIX, and Mac. Large Coding must be written in languages? Like C, C ++ and Java.  But in the language of Python, you can write a small coding and create the best program. The program written in a different computer language can be used in Python language. Similarly, a Python language program can be used in a different computer language. This is the biggest feature of Python language. There are a lot of standard libraries in Python. Using this can easily create a program. Using the Python language can create a web application, email parsing, network programming, desktop application, Internet protocol, games, robot program, mobile applications, GUI application, and scientific applications. Python is also widely used in fields such as Artificial Intelligence, Internet scripting, Embedded scripting, Database programming, System utilities, Machine Learning, Image Processing, Data Science Analisis, Web Development, Robotics, and Automation. With Python, you can create a simple Chat bot. You can create a computer language with Python.

Chapter 2:  Why is Python Language so popular?

The top reason for Python's language is to be world popular. This is an open source language. Everyone can download it for free. No payments are required. There is a lot of community support to develop the program.  Python has a large number of standard libraries. Using this can create huge programs. The coding is easy to write. You can write a program quickly with Python. Python can easily learn the language. There are Frameworks like Django, Flask, NumPy, SciPy and more to simplify the program. The Python language program can also be used in languages? Like C and Java.  Python learners get a higher paid job immediately. For many of these reasons, the Python language is very popular.

Chapter 3:  Why the name Python?

In 1970, a “Monty Python's Flying Circus” program was broadcast on one of a Britain TV. Guido van Rossum is from the Netherlands. He was a fan of this TV show. He is an excellent software developer.  In 1991, he developed a computer language. He was thinking of putting this name into the computer language. Then he remembered that TV show. The TV program took the name of Python and named him Python for his computer language. This is the reason for this Python language.

Chapter 4:  Why learn Python Language?

In today's world, a lot of people are learning C, C ++, Java and are now working without a job. Because, all software companies use Python language. So the work is available for the people who know Python. It's very easy to learn the Python language. If you need to get a job immediately, learn the python language. The biggest companies such as Google, Microsoft are priority to the Python knowledge. It is very simple to write coding in Python language. The program is long for writing in other languages. But, let's write the program in Python immediately. We are studying in the intention of being available for work. So get the job opportunity to learn Python.

Chapter 5:  Which companies are using python?

Bit companies like Google and Yahoo are currently using Python. Let’s see in detail below, what companies in the world use Python language.

Google

Reddit

Yahoo Maps

Hipmunk

Industrial Light and Magic

YouTube

DropBox

NASA

Yahoo

Quora

Instagram

Pinterest

BitTorrent

Spotify

Facebook

Netflix

Dropbox

Reddit

PayPal

Uber's Tech

Twilio

lyft

Amazon

SurveyMonkey

Facebook

Industrial Light and Magic

IBM

Mozilla

Hipmunk

Pinterest

The Onion

Disqus

JP Morgan Chase

PayPal

Zola

Thought Machine

robin hood

Kenco

stockspot

Newable Business Finance

iwoca

figo

Washington Post

Stripe Dwolla

Venmo

Bond Street

Kabbage

Qonto

Holvi

Uber

Twilio

Bitbucket Prezi

Pitchfork

Zope Corporation

Shopzilla

Crystal Space

Civilization 4

Walt Disney Feature Animation

Goldman Sachs

Glassdoor

Affirm

Vyze

Chapter 6:  History of Python Language

Python language was created in 1991. Guido van Rossum created the Python. He belongs to the Netherlands. From the day of the Python language, for a lot of Versions has been published. Let's see below its details.

Python - 3.7.3 - - (Release dt. 25.03.2019)

Python - 3.4.10 - (Release dt. 18.03.2019)

Python - 3.5.7 - (Release dt. 18.03.2019)

Python - 2.7.16 - (Release dt. 04.03.2019)

Python - 3.7.2 - (Release dt. 24.12.2018)

Python - 3.6.8 - (Release dt. 24.12.2018)

Python - 3.7.1 - (Release dt. 20.10.2018)

Python - 3.6.7 - (Release dt. 20.10.2018)

Python - 3.5.6 - (Release dt. 02.08.2018)

Python - 3.4.9 - (Release dt. 02.08.2018)

Python - 3.7.0 - (Release dt. 27.06.2018)

Python - 3.6.6 - (Release dt. 27.06.2018)

Python - 2.7.15 - (Release dt. 01.05.2018)

Python - 3.6.5 - (Release dt. 28.03.2018)

Python - 3.4.8 - (Release dt. 05.02.2018)

Python - 3.5.5 - (Release dt. 05.02.2018)

Python - 3.6.4 - (Release dt. 19.12.2017)

Python - 3.6.3 - (Release dt. 03.10.2017)

Python - 3.3.7 - (Release dt. 19.09.2017)

Python - 2.7.14 - (Release dt. 16.09.2017)

Python - 3.4.7 - (Release dt. 09.08.2017)

Python -.5.4 - (Release dt. 08.08.2017)

Python - 3.6.2 - (Release dt. 17.07.2017)

Python - 3.6.1 - (Release dt. 21.03.2017)

Python - 3.4.6 - (Release dt. 17.01.2017)

Python - 3.5.3 - (Release dt. 17.01.2017)

Python - 3.6.0 - (Release dt. 23.12.2016)

Python - 2.7.13 - (Release dt. 17.12.2016)

Python - 3.4.5 - (Release dt. 27.06.2016)

Python - 3.5.2 - (Release dt. 27.06.2016)

Python - 2.7.12 - (Release dt. 25.06.2016)

Python - 3.4.4 - (Release dt. 21.12.2015)

Python - 3.5.1 - (Release dt. 07.12.2015)

Python - 2.7.11 - (Release dt. 05.12.2015)

Python - 3.5.0 - (Release dt. 13.09.2015)

Python - 2.7.10 - (Release dt. 23.05.2015)

Python - 3.4.3 - (Release dt. 25.02.2015)

Python - 2.7.9 - (Release dt. 10.12.2014)

Python - 3.4.2 - (Release dt. 13.10.2014)

Python - 3.3.6 - (Release dt. 12.10.2014)

Python - 3.2.6 - (Release dt. 12.10.2014)

Python - 2.7.8 - (Release dt. 02.07.2014)

Python - 2.7.7 - (Release dt. 01.06.2014)

Python - 3.4.1 - (Release dt. 19.05.2014)

Python - 3.4.0 - (Release dt. 17.03.2014)

Python - 3.3.5 - (Release dt. 09.03.2014)

Python - 3.3.4 - (Release dt. 09.02.2014)

Python - 3.3.3 - (Release dt. 17.11.2013)

Python - 2.7.6 - (Release dt. 10.11.2013)

Python - 2.6.9 - (Release dt. 29.10.2013)

Python - 3.3.2 - (Release dt. 15.05.2013)

Python - 3.2.5 - (Release dt. 15.05.2013)

Python - 2.7.5 - (Release dt. 12.05.2013)

Python - 3.2.4 - (Release dt. 06.04.2013)

Python - 2.7.4 - (Release dt. 06.04.2013)

Python - 3.3.1 - (Release dt. 06.04.2013)

Python - 3.3.0 - (Release dt. 29.09.2012)

Python - 3.2.3 - (Release dt. 10.04.2012)

Python - 2.6.8 - (Release dt. 10.04.2012)

Python - 2.7.3 - (Release dt. 09.04.2012)

Python - 3.1.5 - (Release dt. 09.04.2012)

Python - 3.2.2 - (Release dt. 03.09.2011)

Python - 3.2.1 - (Release dt. 09.07.2011)

Python - 2.7.2 - (Release dt. 11.06.2011)

Python - 3.1.4 - (Release dt. 11.06.2011)

Python - 2.6.7 - (Release dt. 03.06.2011)

Python - 2.5.6 - (Release dt. 26.06.2011)

Python - 3.2.0 - (Release dt. 20.02.2011)

Python - 2.7.1 - (Release dt. 27.11.2010)

Python - 3.1.3 - (Release dt. 27.11.2010)

Python - 2.6.6 - (Release dt. 24.08.2010)

Python - 2.7.0 - (Release dt. 03.07.2010)

Python - 3.1.2 - (Release dt. 20.03.2010)

Python - 2.6.5 - (Release dt. 18.03.2010)

Python - 2.5.5 - (Release dt. 31.01.2010)

Python - 2.6.4 - (Release dt. 26.10.2009)

Python - 2.6.3 - (Release dt. 02.10.2009)

Python - 3.1.1 - (Release dt. 17.08.2009)

Python - 3.1.0 - (Release dt. 26.06.2009)

Python - 2.6.2 - (Release dt. 14.04.2009)

Python - 3.0.1 - (Release dt. 13.02.2009)

Python - 2.5.4 - (Release dt. 23.12.2008)

Python - 2.5.3 - (Release dt. 19.12.2008)

Python - 2.4.6 - (Release dt. 19.12.2008)

Python - 2.6.1 - (Release dt. 04.12.2008)

Python - 3.0.0 - (Release dt. 03.12.2008)

Python - 2.6.0 - (Release dt. 02.10.2008)

Python - 2.3.7 - (Release dt. 11.03.2008)

Python - 2.4.5 - (Release dt. 11.03.2008)

Python - 2.5.2 - (Release dt. 21.02.2008)

Python - 2.5.1 - (Release dt. 19.04.2007)

Python - 2.3.6 - (Release dt. 01.11.2006)

Python - 2.4.4 - (Release dt. 18.10.2006)

Python - 2.5.0 - (Release dt. 19.09.2006)

Python - 2.4.3 - (Release dt. 15.04.2006)

Python - 2.4.2 - (Release dt. 27.09.2005)

Python - 2.4.1 - (Release dt. 10.03.2005)

Python - 2.3.5 - (Release dt. 08.02.2005)

Python - 2.4.0 - (Release dt. 30.11.2004)

Python - 2.3.4 - (Release dt. 27.05.2004)

Python - 2.3.3 - (Release dt. 19.12.2003)

Python - 2.3.2 - (Release dt. 03.10.2003)

Python - 2.3.1 - (Release dt. 23.09.2003)

Python - 2.3.0 - (Release dt. 29.07.2003)

Python - 2.2.3 - (Release dt. 30.05.2003)

Python - 2.2.2 - (Release dt. 14.10.2002)

Python - 2.2.1 - (Release dt. 10.04.2002)

Python - 2.1.3 - (Release dt. 09.04.2002)

Python - 2.2.0 - (Release dt. 21.12.2001)

Python - 2.0.1 - (Release dt. 22.06.2001)

Python 2.0 - (Release dt. 16.10.2000)

Python 1.6 - (Release dt. 05.09.2000)

Python 1.5.2p2 - (Release dt. 22.03.2000)

Python 1.5.2p1 - (Release dt. 06.07.1999)

Python 1.5.2 - (Release dt. 30.04.1999)

Python 1.5.1p1 - (Release dt. 06.08.1998)

Python 1.5.1 - (Release dt. 14.04.1998)

Python 1.5 - (Release dt. 17.02.1998)

Python 1.4 - (Release dt. 25.10.1996)

Chapter 7:  Features of Python Language

There is a lot of python's specialty. It is the first of which is an open source language. This is a very simple language. Simply learn this. If you learn python, you get the job easily. Write less of the coding and create a program. Okay. We will learn in detail below the features of Python.

A high-level interpreted language

Simple Elegant Syntax

Not overly strict

The expressiveness of the language

Good Language to Teach Programming

Beginner friendly

Large Community support

Great Employment Opportunities

Interpreter (Learning made easy)

A simple language which is easier to learn

Elegant

Object-oriented

Portable

Great libraries

Readable code

Beautiful code

Rapid development

Robust Standard Library

Many Open Source Frameworks and Tools

Simplify Complex Software Development

Great standard library

Very fast

Functional programming

Matlab alternative

Scientific computing

Great documentation

Productivity

Easy to learn

Free and open-source

Extensible and Embeddable

Large standard libraries to solve common tasks.

Open source

Powerful

Dynamic typing

Get Immediately Jobs & Careers

Readable and Maintainable Code

Multiple Programming Paradigms

Compatible with Major Platforms and Systems

Other Libraries can be attached in Python

Python libraries can be attached to other languages

Modular

Imperative

Simple is better than complex

It's the way I think

Easy to read

Fast and simple

Very programmer and non-programmer friendly

Powerful language

The complex is better than complicated

Simple and easy to learn

Print "life is short, use python"

Great for analytics

Multiple Inheritance

It's lean and fun to code

Rapid Prototyping

Special cases aren't special enough to break the rules

Great for tooling

Socially engaged community

Easy to learn and use

Fast coding and good for competitions

Comfortable to use

Highly Scalable

Supports many libraries

Easy Access to Data

Integration with an extensive system

Operational Efficiency

Development Speed

Security

Machine learning support

Clear and easy and powerful

High Documented language

Beautiful is better than ugly

Python has great libraries for data processing

Although practicality beats purity

The flat is better than nested

Readability counts

Data Science & Machine Learning

Main applications & more

Extensive Libraries & Framework

Can work with other programming languages

Improving productivity

Scripting

Explicit is better than implicit

Unlimited power

Unlimited power

Ease of development

Import antigravity

List Comprehensions

Lists, Tuples, Dictionaries

Plotting

Fast Prototyping

Easy to Decipher

It’s Extensive Open source Environment

Chapter 8:  Why Python is different from other languages?

Python is a lot of differences and other languages. Python is the best in comparison with other languages. Python has a lot of specialty in the language. If you want to write a program in C, C ++ and Java, you have to write more coding. That is, there is about coding in thousands of pages. But a small coding can be written in Python and a program can be created. You need to spend money on buying other computer languages. But Python can be downloaded for free. Learning other languages is very difficult. But, Python can easily learn. For those who have been learned with other languages, it is very difficult to get the job. For those who read Python, get the job immediately. The largest companies such as Google are using Python language.

Chapter 9:  How download Python Language?

Step 1: Go to google.com and type the ‘python’ in the address bar.

Step 2: Then click on the first link.

Step 3: Now, Python website open up. Then click the “Download” Button and select your operating system.

Download for Windows: https://www.python.org/downloads/windows

Download for others: https://www.python.org/download/other

Download for Linux : https://www.python.org/downloads/source

Download for Mac: https://www.python.org/downloads/mac-osx

Step 4: Then a window appears. If you use the Windows Operation System, Click the “Python 3.7.3 button.  If you use another operating system like Linux, click on the “other platforms” link on the left side.

Step 5: Once you click the link of the operation system you need, the Python Program is downloaded. This is saved in a folder called ‘Download’ in C Drive in your computer.

Chapter 10:  How Install Python Language?

Step 1: Open the Download folder in your computer and the double click on the Python program file.

Step 2: Then click ‘Run’ button on the window that appears.

Step 3: Then click ‘Install Now’ link on the window that appears.

Step 4: Now, the Python Program is installed on your computer within few minutes.

Step 5: After that, the window “Setup was successful” will open. Now, Python program is successful installed your computer.

Step 6: Now, Click start Menu and Click “All Programs” Tab

Step 7: Then a submenu appears. Click on the “Python 3.7 (32-bit)” tab in it.

Step 8: Currently, the Python program opens. Then you can write a program with Python.

Step 9: Python’s first program (Hello world program)

Chapter 11:  What is Python IDE?

Python IDE is software.  It is designed to make the Python program easier to develop. Python program can be written in three ways. First one Write a program with Comment Prompt. The second one, you can also write a program using Python. In these two ways, the program is difficult to write. So the Python IDE was created to make a program easy and run. A program can easily be written through Python IDE.  Let's run it. You can fix errors in the program. There are lots of Python IDEs. The most important of these is pycharm. There are lots of Python IDEs like pycharm. Let's get to know them below.

1. PyCharm

2. Rodeo

3. Thonny

4. Spyder

5. Pydev

6. Wingware

7. Eric Python

and more…

                     PyCharm

Download Official Site: https://www.jetbrains.com/pycharm

                     Rodeo

Download Official Site: http://rodeo.yhat.com

                     Thonny

Download Official Site: https://thonny.org

                     Spyder

Download Official Site: https://www.spyder-ide.org

                     Pydev

Download Official Site: http://www.pydev.org

                     Wingware

Download Official Site: https://wingware.com

                     Eric Python

Download Official Site: https://eric-ide.python-projects.org

Chapter 12:  What is Code Editor?

If you want to learn Python, then you should know the Code Editor. This Code editor can easily write a Python program. There are many Code editor programs to write the Python program. Let us know about some important code editor.

                     Sublime Text

Download Official Site: https://www.sublimetext.com

                     Atom

Download Official Site: https://atom.io

                     Vim

Download Official Site: https://www.vim.org

                     Visual Studio Code

Download Official Site: https://code.visualstudio.com

Chapter 13:  How Setup Python Environment?

To run the Python Program Command Prompt, you need to have an environment variable set in your computer. First, you need to install the Python program on your computer.  Then follow the following steps and set the environment variable.

Step 1: Click ‘Start button’ and right click ‘Computer’ sub-menu, and then click ‘properties’

Step 2: Click ‘Advanced system settings’ tab.

Step 3: Click ‘Advanced’ tab and click ‘Environment Variables’ button

Step 4: Then click ‘New’ button.

Step 5: Type variable name any and type python installed location

Step 6: Click path and click edit

Step 7: Go to line end and type python installed location path. Then click ok button two times.

Chapter 14:  Python Application (Framework)

Many programs have already been written in Python. These are called Framework. The framework has been developed separately for various departments. Applications like Django, Flask, Pyramid, Plone and Django CMS are used for web development. EarthPy for earth science. AstroPy for Astronomy research.

                     Django

Official website: https://www.djangoproject.com

                     Pyramid

Official website: https://trypyramid.com

                     TurboGears

Official website: http://www.turbogears.org

                     Web2py

Official website: http://www.web2py.com

                     Flask

Official website: http://flask.pocoo.org

                     Bottle

Official website: http://bottlepy.org/docs/dev/index.html

                                   CherryPy

Official website: https://cherrypy.org

                     Sanic

Official website: https://sanic.readthedocs.io/en/latest

                     Tornado

Official website: http://www.tornadoweb.org/en/latest

10.Dash

Official website: https://plot.ly/products/dash

More Python Applications (Framework):

Raygun

IBM DB2

Opbeat

Stormpath

Server Density

Flynn

Takeaways

Sentry

CircleCI

Datadog

Rollbar

Passenger

Cloudinary

Airbrake

imgix

BlockScore.

Pilosa

Quilt

Stream

Sonic Server

Plotly

Quantifiedcode

webapp2

Plotly

Quantifiedcode

webapp2

SQLAlchemy

Keras

Honeycomb

Sheetsu

Flagr

Saleor

Airship

Faktory

Polyaxon

SparkPost

IOpipe

Buddy

Dockbit

HexoPress

PythonAnywhere

Ethereum

Hug

Vim Python

uWSGI

SpeechPy

SignalFx

Amazon Translate

PyTorch

Pyright

Azure Pipelines

Cosmic JS

Graphene

riko

NGINX Unit

Sandglass

Anvil

EdgeDB

PythonAnywhere

Saleor

Stream

Pilosa

Vibora

pyup

HexoPress

Flagr

Sheetsu

Honeycomb

SQLAlchemy

Plotly

Sonic Server

StackPath

Gradient

Doppins

Bandwidth

Dependabot

Eel

Azure Cosmos

GuardRails

Gaia

Falcon

Pandas

Please

Ludwig

NanoNets

NeverBounce

Apache Zeppelin

Sanic

Google Cloud

Cloud Backend

webapp2

NumPy

Airship

Quantifiedcode

Quilt

Snowflake

Chapter 15:  Python Program Basic Fundamental

Some basic information should be written in the Python language program. Let's learn about them in details below.

•         Variable

For all computer languages, the variable is very important. To learn a computer language, first, you need to know about the variable. Variable is a container. The values ​​we give are the store in this variable. A variable can be either an integer, a string or a float. In C, C ++, Java, you need to input data type. But there is no need to input data type in Python. The first character of a variable must begin with the alphabet. A number or special character should not be the first letter. Python is a case sensitive language. If you use the lowercase letterer and then use the capital letter, the Syntax Error will come.  There is no need to input the data type to declare a variable in Python.

•         Keyword

Keyword is an important component of Python. Python has a total of 33 keywords. Keywords are the reserved words in Python Language. This keyword can not be used a variable name or function name or as any identifier. The python keyword list is given below.

•         Numbers

Numbers in Python is one of the most important. Numbers can be divided into three categories. They are integer, float, and complex. Python can be used as a calculator. It can do basic calculations like addition, minus, multiplication, division.  More complex calculations can be solved.

•         String

A string is a word. This is the word with a character or multiple Character. There is no number or special character. You can declare String in two modes. They are a single quotation and double quotation.

a = `python' (single quotation)

b = "python" (double quotation)

•         Typecasting

Typecasting is important in Python.  Typecasting is to change from one type to another. You can change an integer into a string. Similarly, a string can be converted into an integer. You can also change an integer to float and a Float to Integer.

•         Operator

The operator is the most important part of the python. In Python, the operators are divided into several categories. They are ...

1. Arithmetic Operator

2. Relational Operator

3. Assignment Operator

4. Logical Operator

5. Bitwise Operator

6. Membership Operator

7. Identity Operator

1. Arithmetic Operator

Make calculations with the arithmetic operator. This can be divided into seven categories. They ...

a) + (plus) = add two numbers

b) - (subtraction) = substrate two numbers

c) / (division) = divided two numbers

// (flow division) = get float value

d) % (modulo) = reminder

e) * (multiplication) = multiple two numbers

f) ** (exponent) = power of

2. Relational Operator

The Relational Operator is the interaction between the two variables.  There are 6 relays operators in Python. They are ...

a) == (equal to equal)

b) != (not equal)

c) > (greater then)

d) < (less than)

e) >= (greater than or equal to)

f) <= (less than or equal to)

3. Assignment Operator

The Assignment operator is used to evaluate an operator.

4. Logical Operator

The logical operator is used to analyze two conditions and make a decision. There are three logical operators in Python. They are ...

a) and

b) or

c) not

5. Bitwise Operator

Bitwise operator is used to converting a decimal value into a binary value. It is divided into six categories. They are ...

a) & (Binary AND) 

b) | (Binary OR)

c) ^ (Binary XOR) = (a ^ b)

d) ~ ) Binary Ones Complement)

e) << (Binary Left Shift)

f) >> (Binary Right Shift)

6. Membership Operator

The membership operator is two types. They ...

a) in

b) not in

7. Identity Operator

The identity operator is two types. They are ...

a) is

b) is not

•         Operator Precedence

Operator Precedence is one of the most important. Operator Precedence is an operator which must first be executed in an expression. Let us see below the rules for which the operator should first be executed and then which should be executed.

1. ( ) parentheses

2. +x, -x, ~x

3. ** exponentiations

4. *, /, %, //

5. +, -

6. >>, <<, &

7. ^, |

8. <=, <>, >

9. <>, ==, != (equality Operator)

10. =/=, /=, //=, -=, +=, *=, **= (assignment Operator)

11. is, is not (identity Operator)

12. in, not in (membership Operator)

13. not, or, and (logical Operator)

•         Branching Statement

Branching statement is divided into four. They are ..

if statement

if else statement

if-elif-else ladder statement

nested if statement

1. if statement

A condition is evolutes’. If the condition is correct then it will do the job given. If done wrong, no work will be done.

2. if else statement

If the condition is correct, it will do a job. If done incorrectly it will do a another job.

3. if-elif-else ladder statement

There will be a lot of condition. First check a condition. It will then check for a different condition. Step by step it will check all the conditions. Then whatever the correct condition is, it will execute.

4. nested if statement

There will be a statement. There will be another statement within it.

•         Looping Statement

The looping statement is to repeat a job. Looping statements are two types. They are ...

1. while loop

2. for loop

1. while loop

The while loop will be based on the condition. The program remains executive until the condition is correct. The program does not execute when the condition is false.

2. for loop

The for loop is based on the sequence. If a string contains 6 letters, it will process those 6 letters. The for loop works based on the length of the string. The for loop is used to print the value within a list as independence.

•         List

The List is a new concept. This concept is not available in other languages. It is only in Python. A string or a number can give a value to a variable. But in this list concept, you can give everything as a value, a string, a number, and a character. In this list, the value of a variable should be given to the square bracket. There are lots of functions in the list. Let's see them in detail below.

1. len

2. max

3. min

4. list  

5. append

6. count

7. extent

8. insert

9. pop

10. remove

11. reverse

12. sort

1. len (The total number of values in a list)

2. max (The high value in a list)

3. min (The lowest value in a list)

4. list (Converting a string to a list)

5. append (Adding a new value to a list)

6. count (The total number of values of the same value in a list)

7. extent (Putting the two lists together)

8. insert (Adding an value to an index according to a list)

9. pop (Deleting an value according to the index of a list)

10. remove (Deleting an value in a list)

11. reverse (Reversing the values in a list)

12. sort (Replacing values in a list in ascending order)

•         Tuple

The tuple is like a list concept. There is only one difference between the two. That's immutable. In the list, you can change the value in a variable.  But the value in the tuple concept cannot be changed. The list is mutable.  A tuple is immutable. In the Tuple Concept, when the Value gives a variable, Parentheses ( ) should be used.

•         Set

We'll be using Set's concept in calculations. We say that the same concept is implemented through the program. Only curly braces { } can be given value to a variable. It does not accept the duplicate value. There are 11 functions in the set concept.  Let's see what they are about.

1. add

2. clear 

3. copy

4. difference

5. union

6. intersection 

7. isdisjoint

8. issubset

9. isupperset

10. remove

11. symmetric_difference

add  (Adding a value to a set)

clear (Deleting all values in a set)

copy (Copying one set and turning it into another set)

difference (The difference in values in the two sets)

union (Combining the values in the two sets)

intersection (Finding common values in two sets)

isdisjoint (True: if both sets have no common value) (False: if both sets have common value)

issubset (True: The value in one set, if it is in another set) (False: The value in one set, if not in another set)

isupperset (True: The value in a large set, if in a small set) (False: The value in a large set, if not in a small set)

                 remove (To delete a value in a set)

                 symmetric difference (Is a value that is not common in both sets)               

•         Dictionary

Dictionary is a concept similar to List, Tuple, and Set. This is a special concept in Python. Curly braces { }need to be used to declare a value in the dictionary. It cannot use the duplicate value. This will be a key pair of (key_value, key-value). A value can be accessed using the index on the List concept. But using the key in the Dictionary Concept is accessible to its value. There are three functions in the dictionary concept.  They are 'len' 'del' and 'pop'

•         Function

The function of writing a program is very important. In Python, there are two types of function. They are ...

Predefine Function (len, del etc.,)

Predefine function is already developed by the developer.

2. User define Function

(The user defines function is to create a user.  This is defined by the keyword 'def')

•         Classes and Object

Class is a blueprint for the object. It contains all the details about the variable and functions. The object is simply a collection of data (variable) and methods (functions) that act on those data.

Chapter 16: Python Programmes (12 Nos) with Code

In past chapters, we learned about Python. Now let's learn about the basic program of Python.

1. Find ASCII Value of Character

2. Find Factors of Number

3. Find LCM

4. Find Numbers Divisible by Another Number

5. Find the Factorial of a Number

6. Find the Largest Among Three Numbers

7. Find the Square Root

8. Find the Sum of Natural Numbers

9. Generate a Random Number

10.        Multiply Two Matrices

11.        Print all Prime Numbers in an Interval

12.        Swap Two Variables

Chapter 17:  What is Machine Learning?

Chapter 18:  What is Data Science Analysis?

Chapter 19:  What is Artificial Intelligence?

Chapter 20:  What is Deep Learning?

Conclusion

Thank you so much for downloading this Python Programming book.  I hope you have gained knowledge about Python through this book. If you read this book once, you will not understand.  It should be read several times.  Read it many times and understand well.  The book is illustrated in simple English, with pictures to illustrate it well.  For beginners, this book is very useful for computer language learners. This book is helpful for you to learn Python and get a job immediately at the biggest software companies. Thank you once again for reading this book. I pray to God that you will soon find a job in a large software company.

*****