Report On Python
Report On Python
ECE REPORT
ON
2020-21
Submitted to - Submitted by -
Mr. Rakesh kardam Student name - VISHAL JAIN
RTU Roll no. - 19EJCEC824
1
CERTIFICATE
2
ACKNOWLEDGEMENT
VISHAL JAIN
ABSTRACT
3
The Objective of undertaking the industrial training is to provide
a work experience so that students engineering knowledge is
enhanced. Industrial training also provides an opportunity to
students to select an engineering problem and possibly an
industry guide. It is essential to bridge the gap between the
classroom and industrial and environment. This is to enrich
their practical learning and will be better equipped to integrate
the practical experiences with the classroom learning processes.
With this objective this major training session of 20 days has
been successfully finished and added to CAD DESK India. Here
We thought about the various concepts present in python. The
technique to develop web based applications so that users from
distant systems can access the application. The training was full
of practical as well as theoretical knowledge. The concepts were
first thought in the classroom and then these concepts were
implemented in the program. During the complete training
period, we were taught to use all the classes, interference and
the packages and implement them properly.
4
TABLE OF CONTENT
CERTIFICATE
ACKNOWLEDGEMENT
ABSTRACT
TABLE OF CONTENT
FIGURE OF INDEX
PREFER
CONTENT
1. Introduction of Industry
2. History of python
3. Why python?
4. Characteristics of python
5. Data Structures in Python
6. File Handling in python
7. Use of Numpy
8. Use of Matplotlib
9. Use of pandas
10. Use of OpenCV
11. Conclusion
Introduction of Industry -
5
IQRA Software Technologies, is a premier institute which
provides IT and software skills training in the Scientific &
Engineering field with best quality at lower costs. We are one of
the fastest growing software solution, technical consultancy and
knowledge outsourcing company situated in India with offices at
Bangalore, Kanpur and Lucknow.
Mission -
Vision -
DSP, VLSI, Embedded and Software testing are one of the fastest
growing areas in IT across the globe. Our vision is to create a
platform, where trainees/students are able to learn different
features of technologies to secure a better position in the IT
industry or to improve their careers.
History of Python
6
Python was developed in 1980 by Guido van Rossum at the
National Research Institute for Mathematics and Computer
Science in the Netherlands as a successor of ABC language
capable of exception handling and interfacing. Python features a
dynamic type system and automatic memory management. It
supports multiple programming paradigms, including object-
oriented, imperative, functional and procedural, and has a large
and comprehensive standard library.
Van Rossum picked the name Python for the new language from
a TV show, Monty Python's Flying Circus.
Python Releases :-
7
Python 1.6 - September 5, 2000
Python 2.0 - October 16, 2000
Python 2.1 - April 17, 2001
Python 2.2 - December 21, 2001
Python 2.3 - July 29, 2003
Python 2.4 - November 30, 2004
Python 2.5 - September 19, 2006
Python 2.6 - October 1, 2008
Python 2.7 - July 3, 2010
Python 3.0 - December 3, 2008
Python 3.1 - June 27, 2009
Python 3.2 - February 20, 2011
Python 3.3 - September 29, 2012
Python 3.4 - March 16, 2014
Python 3.5 - September 13, 2015
Python 3.6 - December 23, 2016
Why Python ?
8
1. Beautiful is better than ugly
2. Simple is better than complex
3. Complex is better than complicated
4. Readability counts
5. Explicit is better than implicit
Characteristics of Python -
9
• Easy to read: Python source-code is clearly defined and visible
to the eyes.
LISTS-
10
1. Ordered collection of data.
2. Supports similar slicing and indexing functionalities as in
the case of Strings.
3. They are mutable.
4. Advantage of a list over a conventional array
• Lists have no size or type constraints(no setting
restrictions beforehand).
• They can contain different object types.
• We can delete elements from a list by using Del
list_name[index_val]
5. Example-
• my_list = ['one', 'two','three',4,5]
• len(my_list) would output
Dictionary-
● Lists are sequences but the dictionaries are mappings.
● They are mappings between a unique key and a value
pair.
● These mappings may not retain order.
● Constructing a dictionary.
● Accessing objects from a dictionary.
● Nesting Dictionaries.
● Basic Dictionary Methods.
● Basic Syntax o
> d={} empty dictionary will be generated and assign
keys and values to it, like d[‘animal’] = ‘Dog’ o
> d = {'K1':'V1', 'K2’:’V2'} o
> d['K1'] outputs 'V1‘
Tuples-
11
● Immutable in nature, i.e they cannot be changed.
● No type restriction
● Indexing and slicing, everything's the same like
that in strings and lists.
● Constructing tuples.
● Basic tuple methods.
● Immutability.
● When to use tuples?
● We can use tuples to present things that shouldn’t
change, such as days of the week, or dates on a
calendar, etc.
Sets-
12
Python too supports file handling and allows users to handle
files i.e., to read and write files, along with many other file
handling options, to operate on files. The concept of file handling
has stretched over various other languages, but the
implementation is either complicated or lengthy, but like other
concepts of Python, this concept here is also easy and short.
Python treats files differently as text or binary and this is
important. Each line of code includes a sequence of characters
and they form a text file. Each line of a file is terminated with a
special character, called the EOL or End of Line characters like
comma {,} or newline character. It ends the current line and tells
the interpreter a new one has begun. Let’s start with Reading
and Writing files.
We use the open () function in Python to open a file in read or
write mode. As explained above, open ( ) will return a file object.
To return a file object we use open () function along with two
arguments, that accepts filename and the mode, whether to read
or write. So, the syntax being: open(filename, mode). There are
three kinds of mode, that Python provides and how files can be
opened:
• “ r “, for reading.
• “ w “, for writing.
• '' a “, for appending.
• “ r+ “, for both reading and writing
Ex-It is a notepad file (101.txt)
13
Use of Numpy
14
NumPy is a Python package. It stands for 'Numerical Python'. It
is a library consisting of multidimensional array objects and a
collection of routines for processing of arrays.
15
There are many more functions that can be performed by using
this like that takes sin value of the given value ,prints a zero
matrix etc. we also take any image in the form of array.
Use of Matplotlib
Matplotlib is a library for making 2D plots of arrays in Python.
Although it has its origins in emulating the MATLAB graphics
commands, it is independent of MATLAB, and can be used in a
Pythonic, object oriented way. Although Matplotlib is written
primarily in pure Python, it makes heavy use of NumPy and
other extension code to provide good performance even for
large arrays.
Matplotlib is designed with the philosophy that you should be
able to create simple plots with just a few commands, or just
one! If you want to see a histogram of your data, you shouldn’t
need to instantiate objects, call methods, set properties, and so
on; it should just work.
These are some examples of matplotlib..
16
17
18
Use of Pandas
These data structures are built on top of the Numpy array, which
means they are fast.
19
Use of OpenCV -
20
Use the function -
21
Trackbar as the Color Palette -
Code -
22
Conclusion -
23
● It is Free (as in both cost and source code).
● It is trivial to install on a Windows PC allowing students to
take their interest further. For many the hurdle of installing
a Pascal or C compiler on a Windows machine is either too
expensive or too complicated;
● It is a flexible tool that allows both the teaching of
traditional procedural programming and modern OOP.
● It can be used to teach a large number of transferable skills.
● It is a real-world programming language that can be and is
used in academia and the commercial world.
● It appears to be quicker to learn and, in combination with
its many libraries, this offers the possibility of more rapid
student development allowing the course to be made more
challenging and varied.
● and most importantly, its clean syntax offers increased
understanding and enjoyment for students.
24