Report 2
Report 2
INTRODUCTION
OBJECTIVES
The primary objective of the internship was to gain hands-on experience with Python
programming, enhance my understanding of its concepts, and apply the acquired knowledge to real-
world projects.
Gain proficiency in Python Programming language.
Understand the principles of software development using Python.
Apply Python Programming to develop practical applications or solutions.
Collaborate with a team and contribute to project development.
Improve problem-solving and debugging skills using Python Programming
GOALS
1
CHAPTER II
COMPANY PROFILE
Head
Office
Name : Durga Tech
Address :Near Bus Stand, Erode, Tamilnadu-638 003
Mobile No:7373176107
Mail.id : durgatech@gmail.com
2
CHAPTER III
TECHNOLOGY LEARNT
HISTORY OF PYTHON
Python is a widely used general-purpose, high-level programming language. It was initially
designed by Guido van Rossum in 1991 and developed by Python Software Foundation. It was mainly
developed for emphasis on code readability, and its syntax allows programmers to express concepts in fewer
lines of code.
The programming language in which Python is said to have succeeded is ABC Programming Language,
which had interfacing with the Amoeba Operating System and had the feature of exception handling. He had
already helped create ABC earlier in his career and had seen some issues with ABC but liked most of the
features. After that what he did was very clever. He had taken the syntax of ABC, and some of its good
features. It came with a lot of complaints too, so he fixed those issues completely and created a good
scripting language that had removed all the flaws.
The name "Python" came from Guido's being a big fan of the comedy troupe "Monty Python's
Flying Circus" from the 1970s.
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes
code readability with the use of significant indentation.
Python is dynamically typed and garbage-collected. It supports multiple programming paradigms,
including structured (particularly procedural), object-oriented and functional programming.
Python has a simple syntax similar to the English language. Python has syntax that allows
developers to write programs with fewer lines than some other programming languages. Python runs
on an interpreter system, meaning that code can be executed as soon as it is written. This means that
prototyping can be very quick.
APPLICATION
Web Development
3
Data Science
Game Development
Software Development
CAD Applications
Business Applications
Desktop GUI
Python is the main coding language for more than 80% of developers.
Python is a concise and extremely powerful language & that’s why the application of
Python is rapidly gaining popularity. It has been the epicentre of the most amazing technologies
like AI, automation, and machine learning. Further, it is used to facilitate hot subjects like data
analysis and data visualization.
FEATURES OF PYTHON
General purpose programming language which can be used for both scientific
and non scientific programming.
Platform independent hence highly portable language.
Simple high level language with vast library of add-on modules (library).
Interpreted as well as compiled language.
Object oriented and functional programming language.
Clean and elegant coding style.
Suitable for beginners (of course having strong maths and general IQ) who have
no knowledge of computer language.
The latest updated version of python is Python 3.6.x released in March 2017 and continued.
Python code is significantly smaller than the equivalent C++/Java code.
Python is an OSS (Open Source Software). We are free to use it, make amends in the source code
and redistribute, even for commercial interests. It is due to such openness that Python has gathered a
vast community which is continually growing and adding value
4
OBJECT
OBJECT: Object is an identifiable entity which combine data and functions. Python refers to
anything used in a program as an object. This means that in generic sense instead of saying
“Something”, we say “object”.
Every object has,
1. An identity - object's address in memory and does not change once it has
been created.
2. Data type - a set of values, and the allowable operations on those values.
3. A value
DATA TYPES
Data type is a set of values, and the allowable operations on those values. Data type is
of following kind,
Fig1.1
NUMBERS
NUMBERS The data types which store numbers are called numbers.
Numbers are of three kinds,
1. Integer and Long (Integer also contains a data type known as Boolean)
2. Float or Floating point
3. Complex
5
EXAMPLE:
a = 4567345
type(a)
# Interpreter tells that a is of integer type
type(a*13)
Integers contain Boolean Type which is a unique data type, consisting of two constants, True and
False. A Boolean True value is Non-Zero, Non-Null and Non-empty.
COMPLEX
Complex numbers are pairs of real (float) and imaginary (float attached with the sign ‘j’
or ‘J’) numbers. It is of the form A + Bj, where A and B represent float j is defined as √−1.
NONE TYPE
None is special data type that is used to signify the absence of any value in a particular
situation. We can assign the value None to any variable. It represents “nothing” or “no object.”
SEQUENCE
STRING
STRING (type str) A string is a sequence of Unicode characters that may be a combination
of letters, numbers, and special symbols. To define a string in Python, we enclose the string in
matching single (‘ ’) or double (“ ”) quotes.
LIST
List is a sequence of values of any type. These values are called elements or items separated
by comma. Elements of list are mutable (changeable) and indexed by integers. List is enclosed
in square brackets [ ].
6
SETS
Set is an unordered collection of values, of any type, with no duplicate entry. Sets
are immutable.
EXAMPLE:
A = set([1,2,3,1,4,5,7,6,5])
print(A) {1, 2, 3, 4, 5, 6, 7}
len(A)
7
MAPPING
DICTIONARY (dict)
A dictionary is a collection of objects (values) which are indexed by other objects (keys)
where keys are unique. It is like a sequence of ‘key : value’ pairs, where keys can be found
efficiently. We declare dictionaries using curly braces {}. Keys must be immutable objects: ints,
strings, tuples etc.
VARIABLE
Variable is like a container that stores values that can be accessed or changed as and when
we need. If we need a variable, we will just think of a name and declare it by assigning a value with
the help of assignment operator = . In algebra, variables represent numbers. The same is true in
Python, except Python variables also can represent values other than numbers.
Eg:
q = 10 # this is assignment statement
print(q)
OUTPUT: 10
The key to an assignment statement is the symbol = which is known as the assignment operator.
The statement assigns the integer value 10 to the variable q. Said another way, this statement binds
the variable named q to the value 10. At this point the type of q is int because it is bound to an
integer value.
NOTE: Variables are created when they are assigned a value
Variable names must have only letters, numbers, and underscores. They can start with a letter
or an underscore, but not with a number. For example, a variable name may be message_1 but not
message.
7
Spaces are not allowed in variable names. Underscores can be used to separate words in
Variable names. For example, greeting_message is valid, but greeting message is invalid.
Python keywords and function names cannot be used as variable names.
KEYWORDS
Keywords are the reserved words which are used by the interpreter to recognize the structure
of the program, they cannot be used as variable name.
Some of the key words are if, else, class, break, continue, and , or, def, etc..,
Operator is a symbol that does some operation on one or more than one values or variables. The
values or variables on which operation is done is called operand. The operator(s) together with value(s)
or/and variables, is called expression.
EXAMPLE:
3+4 Here,+ is operator.3, 4 are operands
Table 1.1
LOGICAL OPERATORS
8
Table 1.2
RELATIONAL OPERATORS
Table 1.3
Table 1.4
LOOPING STATEMENTS
9
A loop statement allows us to execute a statement or group of statements multiple times.
TYPES:
WHILE LOOP
FOR LOOP
NESTED LOOP
WHILE LOOP: Repeats a statement or group of statements while a given condition is TRUE.
It tests the condition before executing the loop body.
FOR LOOP: Executes a sequence of statements multiple times and abbreviates the code
that manages the loop variable.
NESTED LOOP: You can use one or more loop inside any another while, for or do..while loop.
Eg:
For Loop: for mynum in [1, 2, 3, 4, 5]:
print ("Hello", mynum )
Fig 1.2
10
CONDITIONAL STATEMENTS
Conditional statements (if, else, and elif) are they provide a way to make decisions in
our program and execute different code based on those decisions.
Decision structures evaluate multiple expressions which produce TRUE or FALSE as
outcome. We need to determine which action to take and which statements to execute if outcome
is TRUE or FALSE otherwise.
Fig 1.3
Eg:
a=33
b=200
If b>a:
print(“b”)
OUTPUT: b
Fig 1.4
EXAMPLE:
If...Else Statement: a=200
b=33
11
if b > a:
print(“b is greater than a”)
else:
print(“a is greater than b”)
FUNCTION
Function blocks begin with the keyword def followed by the function name and parentheses
( ( ) ). Any input parameters or arguments should be placed within these parentheses. You can also
define parameters inside these parentheses. The first statement of a function can be an optional
statement documentation string of the function.
The code block within every function starts with a colon (:) and is indented. The statement
return [expression] exits a function, optionally passing back an expression to the caller. A return
statement with no arguments is the same as return None.
SYNTAX
Def functionname(parameters):
“function_docstring”
Function_suite
Return[expression]
Eg:
Def printme(str):
“this print a passed string into this function”
print str return
# Function definition is here def printme( str ): "This prints a passed string into this function" print str
return; # Now you can call printme function printme("I'm first call to user defined function!")
printme("Again second call to the same function")
12
PROGRAM:
# Operators
print("Name:", name)
print("Age:", age)
print("Height:", height)
print("Is Adult:", is_adult)
# Arithmetic Operators
result = age + 5
print("Age after 5 years:", result)
# Comparison Operators
if age >= 18:
print("You are an adult")
else:
print("You are a minor")
# Logical Operators
if age >= 18 and height > 5:
print("You are a tall adult")
else:
print("You are not a tall adult")
13
OUTPUT
Name: John
Age: 25
Height: 5.5
Is Adult: True
Age after 5 years: 30
You are an adult
You are a tall adult
You can vote
apple
banana
cherry
0
1
2
3
4
14
CHAPTER IV
INTERNSHIP OUTCOME
The intership 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,
15
FINAL CHAPTER
The 15-day Python internship has been an enriching and enlightening experience. These past
two weeks have provided a unique and immersive opportunity to dive deep into the world of coding,
problem-solving, and software development. As reflect upon the experiences and accomplishments
First and foremost, the internship allowed to solidify and expand foundational knowledge of
Python. From understanding the basics of variables, data types, and control structures to mastering
more advanced concepts like object-oriented programming and libraries, have witnessed a
assignments, and real-world projects have stretched abilities, enabling to tackle complex coding
challenges with new found confidence. As move forward, excited to apply the lessons learned during
.
16
17