0% found this document useful (0 votes)
83 views

PYTHON1

Python is a high-level, general-purpose programming language created by Guido van Rossum in 1991. It is an interpreted language that is interactive, object-oriented and supports functional and structured programming methods. Python is easy to learn, free and open source, and has a large standard library. It can be used for both simple scripting tasks and large application development.

Uploaded by

Andrew Rupam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views

PYTHON1

Python is a high-level, general-purpose programming language created by Guido van Rossum in 1991. It is an interpreted language that is interactive, object-oriented and supports functional and structured programming methods. Python is easy to learn, free and open source, and has a large standard library. It can be used for both simple scripting tasks and large application development.

Uploaded by

Andrew Rupam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

INTRODUCTION TO PYTHON

Python is a general-purpose interpreted, interactive, object-oriented, and high-


level programming language. It was created by Guido van Rossum during 1985-
1990.
Python is a high-level, interpreted, interactive and object-oriented scripting
language. Python is designed to be highly readable. It uses English keywords
frequently where as other languages use punctuation, and it has fewer syntactical
constructions than other languages.
Python is a MUST for students and working professionals to become a great
Software Engineer specially when they are working in Web Development
Domain. I will list down some of the key advantages of learning Python:
• Python is Interpreted − Python is processed at runtime by the interpreter.
You do not need to compile your program before executing it. This is
similar to PERL and PHP.
• Python is Interactive − You can actually sit at a Python prompt and
interact with the interpreter directly to write your programs.
• Python is Object-Oriented − Python supports Object-Oriented style or
technique of programming that encapsulates code within objects.
• Python is a Beginner's Language − Python is a great language for the
beginner-level programmers and supports the development of a wide
range of applications from simple text processing to WWW browsers to
games.

Characteristics of Python

Following are important characteristics of Python Programming −


• It supports functional and structured programming methods as well as
OOP.
• It can be used as a scripting language or can be compiled to byte-code for
building large applications.
• It provides very high-level dynamic data types and supports dynamic type
checking.
• It supports automatic garbage collection.
• It can be easily integrated with C, C++, COM, ActiveX, CORBA, and
Java.
Features in Python

There are many features in Python, some of which are discussed below –
1. Easy to code:
Python is a high-level programming language. Python is very easy to learn the
language as compared to other languages like C, C#, Javascript, Java, etc. It is
very easy to code in python language and anybody can learn python basics in a
few hours or days. It is also a developer-friendly language.
2. Free and Open Source:
Python language is freely available at the official website and you can
download it from the given download link below click on the Download
Python keyword.
Download Python
Since it is open-source, this means that source code is also available to the
public. So you can download it as, use it as well as share it.
3. Object-Oriented Language:
One of the key features of python is Object-Oriented programming. Python
supports object-oriented language and concepts of classes, objects
encapsulation, etc.
4. GUI Programming Support:
Graphical User interfaces can be made using a module such as PyQt5, PyQt4,
wxPython, or Tk in python.
PyQt5 is the most popular option for creating graphical apps with Python.
5. High-Level Language:
Python is a high-level language. When we write programs in python, we do
not need to remember the system architecture, nor do we need to manage the
memory.
6. Extensible feature:
Python is a Extensible language. We can write us some Python code into C or
C++ language and also we can compile that code in C/C++ language.
7. Python is Portable language:
Python language is also a portable language. For example, if we have python
code for windows and if we want to run this code on other platforms such as
Linux, Unix, and Mac then we do not need to change it, we can run this code
on any platform.
8. Python is Integrated language:
Python is also an Integrated language because we can easily integrated python
with other languages like c, c++, etc.
9. Interpreted Language:
Python is an Interpreted Language because Python code is executed line by
line at a time. like other languages C, C++, Java, etc. there is no need to
compile python code this makes it easier to debug our code. The source code
of python is converted into an immediate form called bytecode.
10. Large Standard Library
Python has a large standard library which provides a rich set of module and
functions so you do not have to write your own code for every single thing.
There are many libraries present in python for such as regular expressions,
unit-testing, web browsers, etc.
11. Dynamically Typed Language:
Python is a dynamically-typed language. That means the type (for example-
int, double, long, etc.) for a variable is decided at run time not in advance
because of this feature we don’t need to specify the type of variable.

Windows: There are many interpreters available freely to run Python scripts
like IDLE (Integrated Development Environment) that comes bundled with
the Python software downloaded from http://python.org/.
## basic functions used in python(sum,subtract,division,multiply)

## write a program to add two numbers


num1 = 1.5
num2 = 6.3
# Add two numbers
sum = num1 + num2

## display the result using print command


c=print("The total of two numbers",sum)

# write a program to add two numbers (user defined)


num3 = int(input('Enter first number: '))
num4 = int(input('Enter second number: '))
sum1=num3+num4
d=print("sum of two numbers", sum1)

# write a program to subtract the two numbers

num5 = 1.5
num6 = 6.3
# subtract two numbers
subtract = num5 - num6

## display the result using print command


e=print("The subtraction of two numbers",subtract)
## write a program to multiply the two numbers

num7 = 1.5
num8 = 6.3

# subtract two numbers


multiply = num7 * num8

## display the result using print command


f=print("The multiplication of two numbers",multiply)

## write a program to divide the two numbers


num9 = 1.5
num10 = 6.3

# subtract two numbers


division = num9 / num10
## display the result using print command
g=print("The division of two numbers",division)
output: The total of two numbers 7.8
Enter first number: 12
Enter second number: 12
sum of two numbers 24
The subtraction of two numbers -4.8
The multiplication of two numbers 9.45
The division of two numbers 0.2380952380952381

You might also like