You are on page 1of 33

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI, KARNATAKA-590 018

“Internship/Professional Practice on
Python”

Submitted for partial fulfilment of the requirement for the award of the degree
Of
Bachelor of Engineering
In
Electrical and Electronics Engineering

Submitted by
SHWETHA N 4AD17EE033

Under the Guidance of


Mr. Sathish K P, MTech (Ph.D.)
Assistant Professor, Department of EEE, ATMECE, Mysuru

Department of Electrical and Electronics Engineering


ATME COLLEGE OF ENGINEERING
13 KM STONE, MYSURU-KANAKAPURA-BENGALURU ROAD, MYSURU-570028
2020-2021
ATME College of Engineering, Mysuru-570028
Department of Electrical and Electronics Engineering

CERTIFICATE
This is to certify that the Internship report is a bonafide work carried out by
MAMATHA : 4AD17EE018, in partial fulfillment for the award of Bachelor of
Engineering in Electrical and Electronics Engineering, of the Visvesvaraya
Technological University, Belagavi - 590 018 during the year 2020-2021. It is certified that
all corrections/suggestions indicated for the Internal Assessment have been incorporated in
the report deposited in the departmental library. The Internship report has been approved as
it satisfies the academic requirements in respect of work prescribed for the said Degree.

Mr. Sathish K P Dr. Parthasarathy L Dr. L Basavaraj


Internal Guide Head of the Department Principal

External Examiners

Name of the Examiners Signature with date

1.

2.
DECLARATION
I, SHWETHA N: 4AD17EE033, student of VIII semester, Department of
Electrical and Electronics Engineering, ATME College of Engineering, Mysuru-
570028 declare that the Internship training has been successfully completed. This report is
submitted to Visvesvaraya Technological University, Belagavi-590 018, in partial
fulfilment of the requirements for the award of Degree of Bachelor of Engineering in
Electrical and Electronics Engineering during the academic year 2019-2020.

Name USN Signature with date

SHWETHA N 4AD17EE033
ACKNOWLEDGEMENT

I sincerely owe my gratitude to all the person who helped and guided me in
completing this Internship.

I am thankful to Dr. L Basavaraj, Principal, ATME College of Engineering,


Mysuru, for having supported me in my academic endeavour’s.

I take this opportunity to express my profound gratitude and deep regards to Dr.
Parthasarathy L, Head, Department of Electrical and Electronics Engineering,
ATME College of Engineering, Mysuru, for the continuous encouragement and
inspiration. The blessing, help and guidance given by him, time to time shall carry us a long
way in the journey of our life on which we are about to embark.

I take this opportunity to express my profound gratitude and deep regards to my


Internal Guide Mr. Sathish K L, Assistant Professor, Department of Electrical and
Electronics, ATME College of Engineering, Mysuru for his exemplary guidance,
monitoring, continuous encouragement and inspiration throughout the progress of this
Internship.

I am thankful to External Guide Mr. Sandesh, Trainer, Route’s technologies,


Mysuru for his exemplary guidance, monitoring, continuous encouragement and
inspiration throughout the progress of this Internship.

I extend my gratitude to Internship Co-Ordinator Mr. Sathish K R, Assistant


Professor, Department of Electrical and Electronic, ATMECE, Mysuru for providing
an opportunity to do the Internship, and thank him for supporting me at Internship.

I am obliged to all Technical staff members of Department of Electrical &


Electronics Engineering, ATME College of Engineering, Mysuru for the valuable
information and support. I am grateful to all non-teaching staff members for their co-
operation during the period of my Internship.

Lastly, I thank almighty, my parents and friends for their constant encouragement
without which this Internship would not be possible.

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: i


Internship/Professional Practice on Python 2020-2021

CHAPTER 1

ABOUT THE COMPANY

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 2


Internship/Professional Practice on Python 2020-2021

1 ABOUT THE COMPANY

An internship is a period of work experience offered by an organization for a limited


period of time. They are typically undertaken by students and graduates looking to gain relevant
skills and experience in a particular field.
Routes technologies and constructions provides a wide variety of services related to
constructions, internship, layout development and Real estate.

1.1 Company Profile:


Routes technologies is a proactive player covering the full spectrum of
software and construction services from design development, implementation,
validation, support and corporate training. Routes technologies provides solutions
that enable its customers to deliver state-of-the-art technological solution.
Leveraging a variety of platforms from embedded engineering to application
development with system software support. Routes technologies is supported by a
strong, committed team delivering quality work. As a diverse end-to-end solutions
provider, offers a range of expertise aimed at helping customers re-engineering and
re-invent their businesses to compete successfully in an ever-changing marketplace,
with the final objective of giving clients the competitive edges in the marketplace.

1.2 vision and Mission

1.2.1 Vision:
The vision statement of Routes technologies has grown totally outdated and will need to
be changed. It states no clear future position for the brand. It is also difficult to relate it with the
brand’s purpose. A vision statement provides guidance on how the brand can continue to move
into its future. Routes Technologies Vision statement talks of anything but the future. It does not
say anything about its employees, customers or even the business. From market size to market

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 3


Internship/Professional Practice on Python 2020-2021

position or other things, it does not provide the faintest inkling of how Routes technologies plans
to grow its business.

1.2.2 Mission:
The mission statement of Routes technologies is short and not very specific. There are two parts
of the mission statement. The first part is about shaping the future of the internet. Routes
technologies deals in products related to connectivity and communications. The second part is
about creating unprecedented value for all the stakeholders. However, the mission statement is
not detailed or specific in any of the two parts. It makes a generic statement about its business in
the first part and then about creating value for the stakeholders in the second. Apart from being
specific, it has to be feasible.
The following courses are provided:
 Python
 Java
 Web development
 Android
 AutoCAD
 3DS MAX

1.3 Objectives of the Internship

The objectives of this Internship are as follows:

• To explain basic of Python.


• To explain features of Python.
• To describe Identifiers, Type casting, Data types and operators in Python.
• To explain Flow control, Transfer statements, functions and Arguments, Modules in Python.
• To design Programs using operators, using different data types.
• To configure Programs using Advanced data types set ,Tuple, list ,Dictionary and String.
•To describe the Packages in Python.
• To describe the creation of Packages in Python.
•To describe the Arrays in Python.
• To explain the implements in CPython and PyPy .
• To explained the Application in Python.
• To explain the Advantages in Python.

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 4


Internship/Professional Practice on Python 2020-2021

CHAPTER 2
PYTHON

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 5


Internship/Professional Practice on Python 2020-2021

2 PYTHON

2.1 WHAT IS PYTHON?


Python is a high-level programming language with applications in numerous areas
including web programming, scripting, scientific computing, and artificial intelligence.

Python supports multiple programming paradigms, including object-oriented,


imperative and functional programming or procedural styles. It features a dynamic type
system and automatic memory management and has a large and comprehensive standard
library. Python interpreters are available for installation on many operating systems,
allowing Python code execution on a wide variety of systems.

2.2 History of Python


python is developed by Guido van Rossum. Guido van Rossum started implementing
python in 1998.Python a is very simple programming language so even if you are new to
programming, you can learn python without facing any issues.
Interesting fact: python is named after the comedy television show Monty python’s flying circus.it
is not named after the python snake.
Python is a high-level interpreted scripting language developed in the late 1980s by Guido
Van Rossum at the national research institute of mathematics and computer science in the
Netherland. The initial version was published at the alternate source in 1991, version 1.0 was
released in1994. Python 2.0was released in2000, and the 2.x versions were the prevalent releases
until December 2008. At that time, the development team made the decision to release the
version3.0 which contain a few relatively small but significant changes that were not backward
compatible with 2.x versions. Python2and 3 are very similar, and some features of Python 3 have
been backported to Python2.But in general, they remain not in compatible.

Fig: Guido Van Rossum

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 6


Internship/Professional Practice on Python 2020-2021

2.3 Why Python?

1. Python works on different platforms (windows, mac, Linux, raspberry pi, etc ).
2. Python has a simple syntax similar to the English language.
3. Python has syntax that allows developers to write programs with fewer lines than some
other programming languages.
4. Python run on an interpreter system, meaning that code can be executed as soon as it is
written. This means that prototyping can be very quick.
5. Python can be treated in a procedural way, an object-oriented way or a functional way.

2.4 What can python do?

 Python can be used on a server to create web application.

 Python can be used alongside software to create workflows.

 Python can be connected to database system, it can also read and modify files.

 Python can be handle big data and perform complex mathematics.

2.6 Python Syntax compared to other programming Languages

 Python was designed for readability, and has some similarities to the English language
with influence from mathematics.
 Python uses new lines to complete a command, as opposed to other programming
languages use semicolons or parentheses.
 Python relies on indentation, using whitespace, to define scope, such as the scope of loops,
functions and classes. Other programming languages often use curly-brackets for this
purpose.

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 7


Internship/Professional Practice on Python 2020-2021

Fig: position of programming languages

Fig: Graph of programing languages used in industry

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 8


Internship/Professional Practice on Python 2020-2021

2.7 Features of python


1. Python is Interpreted:
Python is processed at runtime by the interpreter you are not required to compile
your program before creating it.

2. Python is Interactive:
You can use python prompt and interact with interpreter directly to write your
program.

3. Python is Objected Oriented:


Python supports object-oriented style or technique of programming that
encapsulates code within objects.

4. Python is a Beginners Language:


Python is a great language for the beginners level programmers and supports the
development of a wide range of applications from a sample text processing to www
browser to games.

5. Dynamically Typed programming language:

Unlike other Programming language we are not supposed to specify the type of
the data while storing within a variable. Hence Python is called "Dynamically Typed
Programming language"

2.8 Python Keywords:


 Keywords are the reserved words in python.
 We cannot use a keyword as a variable name, function name or any of the identifiers.
 They are used to define the syntax and structure as the python.
 In python, Keywords are case sensitive.
 There are 33 Keywords in python 3.x version.

2.9 Python Identifiers:

 Identifiers are the names given to the entities like class, functions, variables etc in python.
It helps differentiating one entity from another.

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 9


Internship/Professional Practice on Python 2020-2021

2.10 Python Statement:


Instructions that python interpreter can execute are called as statement.
For eg: a=1 is an assignment operator. If statement, for statement, while statement and
all other statements can be used which is discussed in later part.

2.11 Variables:

In most of the programming language a variable is a named location that is used to


store data in memory.
Each variable must have a unique name called identifier. It is helpful to think of
variable as a container that holds the data which can be changed later throughout
programming.

2.12 Constant:
Constant is a type of variable those value can’t change it is helpful to think constant as
container that hold, which cannot be change. Assigning value to the constant in python
constant are usually declared and assign on a “Module”.
The module means a new file containing “Variable”, “Function” etc which is
imported to a main file. Inside module that constant are written in upper case letter and
underscore separating the words.

RULES AND NAMING CONVERSION FOR VARIABLE AND CONSTANT:

Creating a name that make (it should make some sence that has some information about
what type of data we are storing)

 Use capital letter to write constant


 Never use special symbol like !, @,+,
 Don’t start the name with digit
 Constant are put into python module and when not be change
 Constant and variable name should have a combination of and Alpha bits and underscore.

2.12 DATA TYPE IN PYTHON:

It is facility that is available in program language which is used to “convert data”


which is present in the real world form into binary form so, that is storage in memory.

The Different data types are:

 Float data type

 LIST

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 10


Internship/Professional Practice on Python 2020-2021

 Tuple

 Set

 Dictionary

 Strings

 bytes data type

 byte array data type

 range data type

 frozen set data type

2.12.1 INT:

Python is a Dynamic type language i.e, a variable in python need not be declared.
Depending upon value which is sign to the variable that type is automatically Declare.
Example:
a=56
print(a)
print(type(a))
Output:
56
<class ‘int’>

2.12.2 LIST:

List is a collection of elements(python objects). Purpose of list is, to group up the


things, which falls under same category.
Example:
lst = [10,20,30,40,50]
print (lst)
print (type(lst))
Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 11
Internship/Professional Practice on Python 2020-2021
Output:
[10,20,30,40]
<class ‘list’>

2.12.3 TUPLE:

A tuple is similar to list it is order collection of data however the difference between
the list and tuple is that “ List is Mutable ” whereas “ Tuple is Immutable”.

Tuples once created it cannot be modified. Tuples are used to write protect data and
are usually faster than list as it cannot change dynamically.

It is defined within parenthesis( ) where items are separated by comma.

Example:
a= (1,2,3,4,5)
print (a)
print(type(a))
Output:
(1,2,3,4,5)
<class ‘tuple’>

2.12.4 DICTIONARY:

Dictionary is an unordered collection of key value pairs. It is generally used when we


have a huge amount of data. Dictionaries are optimized for retrieving the data. We must
know the key to retrieve the data.
In python, dictionaries are defined within braces { } with item being a pair in the form
of Key: Value .
Example:
d = {1:'One', 2: 'Two', 3:'Three'}
print (d)
Output:
{1: 'One', 2: 'Two', 3: 'Three'}

2.12.5 STRINGS :
Strings in Python is a ordered collection of series of characters. A string is a sequence of
characters enclosed within single quotes or double quotes. Strings are immutable in python. It
will preserve the Order of insertion i.e., the data(character) would be stored using indexing. We
can access the data stored within a String
Example:
s='sandesh'
print(s)
Output:
sandesh

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 12


Internship/Professional Practice on Python 2020-2021

2.12.5 bytes data type:

Bytes data type represents a group of byte numbers. The allowed values for byte is
from 0 to 255. bytes data type is immutable. Once we create bytes data type value we can
not change the value. bytes() is used to create bytes data type. It will preserve the Order
of insertion i.e. the data would be stored using indexing. We can access the data stored
within a byte’s data type using indexing.
Example:
lst = [10,20,30,40]
print(lst) --> [10, 20, 30, 40
print(type(lst)) --> <class 'list'>
Output:
[10, 20, 30, 40]
<class ‘list’>

2.13 Python break and continue:


In Python, break and continue statements can alter the flow of a normal loop. Loops
iterate over a block of code until test expression is false, but sometimes we wish to terminate
the current iteration or even the whole loop without checking test expression.

2.13.1 Python break statement:

The break statement terminates the loop containing it. Control of the program flows to
the statement immediately after the body of the loop.If break statement is inside a nested loop
(loop inside another loop), break will terminate the innermost loop.

Syntax of break:
Break

2.13.2 Python continue statement:

The continue statement is used to skip the rest of the code inside a loop for the current
iteration only. Loop does not terminate but continues on with the next iteration.

Syntax of Continue:
Continue

2.14 Functions:

In Python, function is a group of related statements that perform a specific task.


Functions help break our program into smaller and modular chunks. As our program grows
larger and larger, functions make it more organized and manageable.

Syntax of Function:
def function_name(parameters):
"""docstring"""
statement(s)
Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 13
Internship/Professional Practice on Python 2020-2021

2.15 Operators
Operator is a Symbol which performs some operations/tasks.
2.15.1 Arithmetic operator:
There are totally 7 Arithmetic Operators in Python as follows
+ --> Addition
- --> Subtraction
* --> Multiplication
/ --> Division
% --> Modulo operator
// --> Floor Division
** --> Power operator/ Exponent Operator
2.15.2 Relational Operator/Comparison operator:
There are 4 Relational operator
>
<
>=
<=

Example:
a=10
b=20
print(a>b) --> False
print(a<b) --> True
print(a<=b) --> True
print(a>=b) --> False

2.15.3 Equality operator:


Equality Operator is used to compare the data , if the data b/w the operands is same
then the o/p is True else False.
Symbol:
==
!=

Example:
print(10==20) --> False
print(1==True) --> True
print(0==False) --> True
print(10==10.0) --> True
print(10==10.6) --> False
Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 14
Internship/Professional Practice on Python 2020-2021

NOTE:
 Incase of Chaining of Equality Operator if any of the comparison is False then the
o/p is False else True
 If == operator is used b/w the operants then the data(value) would be compared
 Inorder to compare the address of the object we have to make use of 'is'
operator Difference b/w == operator and is operator:
== operator is used to compare the values whereas 'is' operator is used to compare the address
of the object

2.15.4 Logical Operator:

And ,Or, Not are the logical operators


NOTE:
 In case of and operator if both the operands is True then the o/p is True else False
 In case of or operator if any of the operand is True then the o/p is True else False
 not is nothing but the compliment (opposite)

Example:

print(False and False) --> False


print(False and True) --> False
print(True and False) --> False
print(True and True) --> True
print(False or False) --> False
print(False or True) --> True

3.3.5 Bitwise Operator:


These operators are applicable only for the below mentioned combinations, else it would lead to
TypeError
int&int, bool&int, int&bool,bool&bool
& --> Bitwise AND
| --> Bitwise OR
^ --> Bitwise XOR
~ --> Bitwise complement Operator
<< --> Bitwise Left shift Operator
>> --> Bitwise Right shift Operator

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 15


Internship/Professional Practice on Python 2020-2021

Example:
print(4&5) --> 4
print(4|5) --> 5
print(4|True) --> 5
print(4^5) --> 1

3.3.6 Shift Operators:


There are 2 Shift Operators in Python
<< --> Bitwise Left shift Operator
>> --> Bitwise Right shift Operator

Example:
print(10<<2) --> 40
print(10>>2) --> 2

3.3.7Assignment Operator:
= --> Assignment Operator
Example:
x=10
print(x) --> 10
print(id(x)) --> 1000
x=x+2 / x+=2(Compound Assignment operator) print(x) --> 12
print(id(x)) --> 2000 x=x*4 / x*=4
print(x) --> 48
NOTE:
 In case of Python there is no PostIncrement or PostDecrement Operations, but if we try to perform
PreIncrement or PreDecrement then there will be no change in o/p
 Inside print() if we take + or - then it will considered as Operator

3.3.8 Ternary Operator:


Its mechanism where we will use greater than equal to 3 Operands NOTE:
~a --> Unary Operator
a+b --> Binary Operator
3 operand --> Ternary Operator

3.3.9 Special Operators:


In case of Python there are 2 Special Operators
1.Identity Operator
2.Membership Operator

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 16


Internship/Professional Practice on Python 2020-2021

Chapter 3
Case study

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 17


Internship/Professional Practice on Python 2020-2021

3 CASE STUDY

3.1 COVID19 TRACKER

The main purpose of this case study is to get accurate results of covid 19 reports around the world
and of specific countries.

COVID19 Module link:


https://pypi.org/project/covid/

pip install covid

CODE

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 18


Internship/Professional Practice on Python 2020-2021

OUTPUT

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 19


Internship/Professional Practice on Python 2020-2021

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 20


Internship/Professional Practice on Python 2020-2021

CHAPTER 4
APPLICATIONS, ADVANTAGES AND DISADVANTAGES

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 21


Internship/Professional Practice on Python 2020-2021

4.1 APPLICATIONS

Fig : applications of python


 web development
 Desktop Applications
 Software development
 Education field
 Database access
 Networking programming
 Game Development
 3D Graphics

4.2 ADVANTAGES

 Simple and easy to learn


 High Level Programming Language
 Platform Independent Programming Language
 Portability
 Dynamically Typed Programming language
 It is both Procedural oriented and Object Oriented Programming Language
 Hybrid Programming Language
 Extensive Builtin libraries
 Embedded

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 22


Internship/Professional Practice on Python 2020-2021

4.3 DISADVANTAGES

 Python is interpreted language and is slow as compared to C, C++, Java.


 Unlike C or C++ it’s not closer to hardware because Python is a high level language.
 For any memory intensive tasks Python is not a good choice.

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 23


Internship/Professional Practice on Python 2020-2021

CHAPTER 5
INTERNSHIP OUTCOME

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 24


Internship/Professional Practice on Python 2020-2021

5 OUTCOME

The internship at Routes technologies and Construction has let me gain the knowledge of
Python programming language and also get to know about real time applications of python in
various sectors. The following things have been learned during internship.
 Learned about the data types
 Learned about running programs in IDLE , IDE, Sublimetext, Pycharm, Online
Python Editors.
 Learned about memory allocation .
 Problem solving by using python programming language.
 Learned about ML and AI using python.

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 25


Internship/Professional Practice on Python 2020-2021

CHAPTER 6
CONCLUSION

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 26


Internship/Professional Practice on Python 2020-2021

6 CONCLUSION

This Internship has helped us to understand concepts of Programs and has given a
overview of types of Python, features and its components. It has also helped us understand the
different types of Data types and operators functions of python, concept of assigning of values to
date types and also learn the flow control, Input and Output operation, user defined functions and
it’s types and Arguments and it’s types. Gain the knowledge about Recursive function, reduced
function, Module and creation of module, Packages in Python and creation of packages.

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 27


Internship/Professional Practice on Python 2020-2021

REFERENCE

1. Guttag, John V. (12 August 2016). Introduction to Computation and Programming Using
Python: With Application to Understanding Data. MIT Press. ISBN 978-0-262-52962-4.
2. ^ "Python 3.9.2 and 3.8.8 are now available". 19 February 2021. Retrieved 19
February2021.
3. ^ "Python 3.10.0a6 is now available for testing". 1 March 2021. Retrieved 2 March 2021.
4. ^ "Why is Python a dynamic language and also a strongly typed language - Python
Wiki". wiki.python.org. Retrieved 27 January 2021.
5. ^ "PEP 483 -- The Theory of Type Hints". Python.org.
6. ^ File extension .pyo was removed in Python 3.5. See PEP 0488
7. ^ Holth, Moore (30 March 2014). "PEP 0441 -- Improving Python ZIP Application
Support". Retrieved 12 November 2015.
8. ^ "Starlark Language". Retrieved 25 May 2019.
9. ^ Jump up to:a b "Why was Python created in the first place?". General Python FAQ.
Python Software Foundation. Retrieved 22 March 2007.
10. Esterbrook, Charles. "Acknowledgements". cobra-language.com. Cobra Language.
Retrieved 7 April 2010.
11. ^ Lattner, Chris (3 June 2014). "Chris Lattner's Homepage". Chris Lattner. Retrieved 3
June 2014. I started work on the Swift Programming Language in July of 2010^ Kupries,
Andreas; Fellows, Donal K. (14 September 2000). "TIP #3: TIP Format". tcl.tk. Tcl
Developer Xchange. Retrieved 24 November 2008.
12. ^ Gustafsson, Per; Niskanen, Raimo (29 January 2007). "EEP 1: EEP Purpose and
Guidelines". erlang.org. Retrieved 19 April 2011.
13. ^ "Swift Evolution Process". Swift Programming Language Evolution repository on
GitHub. 18 February 2020. Retrieved 27 April 2020.

Department of Electrical and Electronics Engineering, ATMECE, Mysuru Page: 28


29

You might also like