Python - Self Learning Part 1
Uses of Python
1- Web
Development
2- Machine Learning
3- Data Analysis
4- Scripting
5- Game
Development
6- Embedded Applications
7- Desktop Applications
It can be
practically used for procedure and object orientation.
Python is an integrated lang. For deep learning & machine learning we have to
install a group of packages.
Anaconda makes it easy to install and use. It
can be downloaded from
Windows & Macintosh OS download and install it as per instructions.
There are 100s of programming languages
available to IT professionals & enthusiasts. Python has made a significant
place due to its dynamic network. It is continuously attempting to reduce bugs
and cleaning up the highlights.
Here are the following reasons, how Python got
its position.
Its quality when you program a website using
it. Clients experience fewer bugs. It supports other programs ideal models,
e.g., procedural, and object-oriented programming.
Productivity. Other programming languages
are composed languages and requires a continuous measure of code to try and procedure,
but Python frees the code to be composed and to be contrasted with other
languages.
Portability. It can run programming
applications at any stage. You just include a couple of lines of code that will
procedure the product to run on different stages. It is an essential language
when creating cross-stage applications.
Its use of Third-party Libraries.
We take Python a multi-use language. Due to
its open-source nature, as of now it is used by millions of engineers &
programmers.
It is used in Systems Programming. It can
create the framework the broad devices, e.g., compilers, translators, and shell
instruments.
It is used in Internet to create simple little
web contents. A ton of WebCrawler and web examination administrators use Python
to execute the data.
Framework Integration – Python has a lot of
libraries that can help with coordinating existing composed Python code to installed
frameworks.
Database Programming – It can help in
discovering the interruption in database. Many Python libraries can help to
check for problems & store a reinforcement in the remote server.
Machine Learning – Python has a lot of libraries
e.g., SciPy & Pandas to help in examining the data & information
availability. It is used by programmers, malware figures, & computer researchers
to do different expository tests.
Qualities of Python
This language is always suggested by professional
programmers to newbies. As it helps to see all basics of a programming
language.
In contrast to other languages, Python
utilizes handy programming models. It supports both Utilitarian and Article
arranged.
It provides an open-source platform created by
dedicated programmers from all the world around. This nature of Python offers
software engineers to try code different and create awesome applications.
Python is a powerful against other well-known
programming languages. It improves the exhibition of any program exponentially.
Python offers a great deal of extensively
helpful framework tools (default). It can play out a thousand of string
activities effectively by using these default instruments.
Python is easier to use as compared to other
programming languages. It utilizes less space. Python is one of the favorite languages
to create Machine Learning applications.
Python Installation
You need Python Interpreter installed on computer
to use it. You need to have a text editor as well to write and saved code.
Latest models of Windows, Linux & Mac OS
already have Python installed. You can check it on terminal by typing Python.
The command should return the version of
Python installed on your system. If not installed, you will be informed that
command is not recognized; so, you must install it.
Latest Python version is 3.x, 2.x is not
supported anymore after 2020.
Download from below link and follow as per
instructions:
![](https://blogger.googleusercontent.com/img/a/AVvXsEjIUcTwtQC4Wnm9wRZFpFcp1ZAzbaWu3es9Hrc0GJ_ckrbYoZO8jp28qJR9CRowmnPTNq88gcBQDG92nYlAgHaTgeCOlYiXzrz0WSCsKmwwZJuP2mPFbT0T09-Fa6-wj3ibZPjD9PM62JAyfbzz_SoB2czL4-xXsqPOnV-JKlZQX3w59SzxcbwekyVn=w595-h58)
Download and install as per operating system
requirements. Keep settings as default.
Make sure you click on Add Python 3.x to PATH.
Now you are ready to go.
Access your terminal and type heroic word,
“Hello World!”.
Hit Enter command and you will see below
result.
Hello World!
Python can be run in two main ways:
1-
Interactive
Interpreter
2-
Script
from the Command line.
Python Data Types
Python supports
different data types. Each variable should belong to one of the data types. Data
types determine the value which can be assigned to a variable, the type of
operation which can be applied to variable as well as the amount of space
assigned to the variable.
Here are the
different data type:
1- Python Numbers
2- Python Strings
3- Python Tuples
4- Python Booleans
5- Python Lists
6- Pythons Sets
7- Functions and Dictionaries
Python Numbers
It helps in the
storage of numeric values. Creation of a number-object can be done in Python if
we assign a value.
E.g. Total =
35
Height = 6
We can delete
single or multiple variables by a simple statement.
Del Total
Del Total, Height
More than two
variables can be deleted simply separating with comma.
Python supports
four numerical values: Int, Float, Complex, in Python 3 all integers are in
long integers form.
Example: Run the
following statements on Python Interactive interpreter
X=35
Print (x)
You will observe
the following result
35
Float is used to
store numbers with decimals.
Example:
X = 5.5325
Print (x)
Result will be
5.5325
X = 5*5.5325
Print (x)
result will be
27.6625
If the operation
is between one int & another float, result will be float as above.
Complex numbers
are made of real & imaginary numbers/parts. Imaginary part denoted by j.
e.g. x = 4 + 5j
Where 4 is real
number while 5j is the imaginary part.
In Python there
is a function type () which determines type of variable. You just have to
insert the name of variable inside that function as argument, and its type will
be determined.
Example:
X = 15
Type(x)
Result will be –
x is class of integer
Similarly;
Name=’Novice’
Type(Name)
N Name is class of strings. This is result on
Python Interactive Interpreter.
Comments
Post a Comment