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

Internship in Python.1

Uploaded by

gs8405220
Copyright
© © All Rights Reserved
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Internship in Python.1

Uploaded by

gs8405220
Copyright
© © All Rights Reserved
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
You are on page 1/ 20

BSA COLLEGE OF

ENGINEERING & TECHNOLOGY

DEPARTMENT OF MECHENICAL ENGINEERING


PRESENTATION OF INTERSHIP IN
PYTHON PROGRAMMING
PRESENTED TO:
PRESENTED BY ; DR. DHAIRYA PRATAP SINGH
GAURAV SHARMA (ASSISTANT PROFESSOR )
(2100650400005) ( M.E. DEPARTMENT )
CONTENTS
1. INTRODUCTION OF PYHTON
2. WHY WAS PYTHON CREATED ?
3. HISTORY OF PYHTON
4. WHY DO PYTHON LEARN ?
5. INSTALLING OF PYHTON
6. RUNNING PYTHON
7. MATH (OPERATORS) IN PYTHON
8. ADVANTAGES OF PYHTON


INTRODUCTION OF PYTHON

• General-purpose , high level programming


language.
• One of the fastest growing and developing
language.
• Initially designed by Guido van Rossum in 1991.
• Dynamic , interpreted ( bytecode – compiled )
language.
• Developed by python software foundation.
Guido van Rossum
( Bytecode is like an intermediate language that runs on a virtual machine . This
virtual machine converts it into machine code . For the machine to actually execute
it on . However , one bytecode will not run on a different virtual machine .)
“ My original motivation for creating python was the perceived
need for a higher level language in the Amoeba (operating system)
project .
I realized that the development of system Administration utilities
in C was taking too long . Moreover , doing these things in the
Bourne shell wouldn’t work for a variety of reason .
So , these was a need for a language that would bridge the gap
between C and the shell “.
-Guido Van Rossum
WHY WAS PYTHON CREATED ?
HISTORY OF PYTHON
• Invented in the Netherlands , early 90s by.
• Guido Van Rossum
• Named after Monty Python.
• Open sourced from the beginning.
• Considered a scripting Language , but is much more
• Scalable , object oriented and functional.
• Used by Google.
• Python 2.0 was released on 16 October 2000.
• Python 3.0 released on 3 December 2008.
• Currently Python 3.10.4 is the stable version.
WHY TO LEARN PYTHON
• These are large number of high – level programming Language like C , C++
, Java etc. But when compared to all these language python has simplest
syntax, availability of Libraries and built – in modules .
• Python comes with an extensive collection of third party resources that
extend the capabilities of the Language .
• Python can be used for large variety of tasks like Desktop applications ,
Data base applications, network programming , game programming and
even mobile development also .
• Python is also a cross platform language which means that the code written
for one operating system like window , will work equally well with
Linux or MacOS without any changes to the python code .
INSTALLING PYTHON
• Python is pre – installed on most Unix systems ,
including Linux and MACOS X.
• But for in Windows operating system , user can
download from the
http://www.python.org/downloads/

- From the above link download latest version of


python IDE and install , recent version is 3.10.4.
• After installing the python ver#
2.7.7 , go to start menu then
click on python 2.7 in that one
you can select python
(command line) it is prompt
with >>>
RUNNING PYTHON
• Once you’re inside the Python interpreter , type in
command at will .

Example:
>>> print (“ Hello world “)
Hello world
MATH ( OPERATOR ) IN PYTHON
Operators:
Add: +
Subtract: -
. >>>Print (3+12)
. 15
. >>>Print (12-3)
. 9
. >>>Print (9+5-15+12)
. 11
Note:- don’t type the arrows >>> !
More operators :
divide: /
multiple: *
>>>print (3*12)
36
>>>print (12/3)
4
>>>print (11/3)
3
>>>print (12.0/3.0)
4.0
>>>print (11.0/3.0
3.66
A CODE SAMPLE ( IN IDLE )
X = 34 – 23
Y = “ Hello”
Z = 3.45
Z == 3.45 or y = = “Hello”;
X = X+ 1
Y = Y + “world”
Print (X)
Print (Y)

Output-
12
. Hello world
- WRITE TO PROGRAM TO FIND AND DELETE REPEATING
NUMBER IN GIVEN LIST.
def. Remove( duplicate) :
final_list = []
for num in duplicate:
if num not in final_ list :
final_list. Append(num)
return final_list

n = int(input(“Enter number of elements:”))


Duplicate = []
While n>0:
temp= input()
duplicate.append(temp)
n-=1
Print(“Original list:”, duplicate)
Print(“ Modified list:”, Remove(duplicate))
OUTPUT –

Enter number of elements: 5


2
3
2
6
2
Original list: [‘2’, ‘3’,’2’,’6’ , ‘2’]
Modified list: [‘2’, ‘3’ , ‘6’ ]
JOB TRENDS IN
PYTHON
ADVANTAGES OF PYTHON
• Most programs in python require considerably less number of
lines of code to Perform the same task compared to other
language like C . So less programming errors and reduces
the development time needed also .
• Though Perl is a powerful language , it is highly syntax
oriented . Similiarly C also.
• The code run line-by-line in the interpreted language . If the
error even appears, it instantly reports about the error and
stops all further execution .
REFERENCES
[1]. Python-course.eu,’Python3 tutorial : Python online course’,
2015. [Online]. Available :
http://www.python-course.eu/python 3course.php.
[2]. www.tutorialpoint.com,’Pythontutorial,’2015.[online].
Available:
http://www.tutorialspoint.com/python /index.htm.
[3]. Wikipedia, ’history of python ‘ , 2015.[online]. Available:
http://en.wikipedia.org/wiki/historyofpython#versionrelease
date.
[4]. Doc.python.org,what’snewpython 3.0’,2015.[online].
Available:
http://docspython.org/3/what’snew/3.0.html.

You might also like