Introduction To Python Programming - 1624291133856
Introduction To Python Programming - 1624291133856
Python was invented by Guido van Rossum in 1991 at CWI in Netherland. The
idea of Python programming language has taken from the ABC programming
language or we can say that ABC is a predecessor of Python language.
There is also a fact behind the choosing name Python. Guido van Rossum was a
fan of the popular BBC comedy show of that time, "Monty Python's Flying
Circus". So he decided to pick the name Python for his newly created
programming language.
Python has the vast community across the world and releases its version within
the short period.
Python provides many useful features to the programmer. These features make it
most popular and widely used language. We have listed below few-essential
feature of Python.
Data Science
Date Mining
Desktop Applications
Console-based Applications
Mobile Applications
Software Development
Artificial Intelligence
Web Applications
Enterprise Applications
Machine Learning
Computer Vision or Image Processing Applications.
Speech Recognitions
In the above example, the statements that are same level to right belong to the
function. Generally, we can use four whitespaces to define indentation.
Python provides the input() function which is used to take input from the user.
Let's understand the following example.
Example:
Output:
By default, the input() function takes the string input but what if we want
to take other data types as an input.
For example:
Example:
Output:
Python Features:
Python provides many useful features which make it popular and valuable
from the other programming languages. It supports object-oriented
programming, procedural programming approaches and provides dynamic
memory allocation. We have listed below a few essential features.
1) Easy to Learn and Use
2) Expressive Language
Python can perform complex tasks using a few lines of code. A simple
example, the hello world program you simply type print("Hello World"). It
will take only one line to execute, while Java or C takes multiple lines.
3) Interpreted Language
4) Cross-platform Language
6) Object-Oriented Language
7) Extensible
It implies that other languages such as C/C++ can be used to compile the
code and thus it can be used further in our Python code. It converts the
program into byte code, and any platform can use that byte code.
It provides a vast range of libraries for the various fields such as machine
learning, web development. There are various machine learning libraries,
such as Tensor flow, Pandas, Numpy, Keras, and Pytorch, etc.
10) Integrated
It can be easily integrated with languages like C, C++, and JAVA, etc. Python
runs code line by line like C, C++, Java. It makes easy to debug the code.
11. Embeddable
The code of the other programming language can use in the Python source
code. We can use Python source code in another programming language as
well. It can embed other language into our code.
PyCharm Installation:
JetBrains provides the most popular and a widely used cross-platform IDE
PyCharm to run the python programs.
1. We can save the newly created project at desired memory location or can
keep file location as it is but atleast change the project default name
untitled to "FirstProject" or something meaningful.
2. Pycharm automatically found the installed Python interpreter.
3. After change the name click on the "Create" Button.
Step - 3. Click on "File" menu and select "New". By clicking "New" option it will
show various file formats. Select the "Python File".
Step - 4. Now type the name of the Python file and click on "OK". We have
written the "FirstProgram".
Step - 5. Now type the first program - print("Hello World") then click on the
"Run" menu to run program.