Sip Report On Python
Sip Report On Python
ON
“CORE PYTHON”
Submitted in the Partial Fulfilment for the Award of Degree
UTTARANCHAL UNIVERSITY
1
ACKNOWLEDGEMENT
I would like to express my deepest gratitude to all those who have supported and guided me
throughout my internship journey. This report would not have been possible without their
invaluable assistance and encouragement.
A special thanks to my family for their encouragement, understanding, and unwavering belief
in me. Your continuous support has been a source of strength and motivation throughout the
journey.
Lastly, thank you all whose contributions, directly or indirectly, for making this journey a
truly rewarding experience.
SINCERLIY,
Neha
Enroll.no,: UU2409000201
2
DECLARATION
Neha, hereby declare that the work presented in this report titled “core python” is my own
original work and was carried out during my internship at ENSINO RESARCH AND
DEVELOPMENT from 26th June 2025 to 24th July 2025.
I confirmed that:
This report has not been submitted to any ither organization or institution for any
academic or professional qualification.
All source of informationhave been duly acknowledged and referenced.
The content of this report is based on the task, activities, and experiences I
encountered during my internship, and it accurately reflects my work and learning
outcomes.
I understand that plagiarism is an academic offense and I have no engaged in any form of
plagiarism in the preparation of this report.
Neha
3
CERTIFICATE OF ORIGINALITY
This is to certify that the work presented in this report titled “ Core Python” is an original and
independent effort carried out by me, Neha, during my internship at ENSINO RESARCH
AND DEVELOPMENT from 46th June2024 to 24th July 2024.
I hereby declare that:
Neha
4
CERTIFICATE OF INTERNSHIP
5
TABLE OF CONTENTS
ACKNOWLEDGEMENT……………………………………………………………………..2
DECLARATION……………………………………………………………………………….3
CERTIFICATE OF ORIGINALITY ………………………………………………………...4
CERTIFICATE OF INTERNSHIP ………………………………………………………......5
TABLE OF CONTEXT ……………………………………………………………………….6
COMPANY PROFILE ..............................................................................................................7
INTRODUCTION .....................................................................................................................8
WEEK 1 PROGRESS ………………………………………………………………………...8
WEEK 2 PROGRESS ……………………………………………………………………….13
WEEK 3 PROGRESS …………………………………………………………………….…22
WEEK 4 PROGRESS ………………………………………………………………………25
CONCLUSION ……………………………………………………………………………….28
REFERENCE…………………………………………………………………………………29
6
COMPANY PROFILE
Ensino Research & Development is the place where students are mastering new skills and
achieving their goals by learning from an extensive list of courses. Every course is designed
to meet the specific industry requirement. Content includes hardware as well as software.
Hours of topic-wise engaging tutorials covering all concepts with multiple problem solutions
by some of India’s best experts. Practical training always finds the better place over
classroom training but now we have implemented the classroom training and practical
training together. Hardware description with live components creates the difference. Even
students can ask for their doubts. Complex concepts explained visually and contextually to
help students create a strong foundation.
Head Office: 1st Floor Usha Complex, GMS Road Ballupur Chowk, Dehradun, Uttarakhand
(248001)
+91-7409707154, +91-6397612901
Corporate Office: Main Rd, Ags Colony, Anand Nagar, Hebbal, Bengaluru, Karnataka
(560024)
+91-9720558050 , +91-740707154
Branch Office: Chakrata Road, Kalsi Gate, Near District Cooperative Bank, Vikas Nagar,
Dehradun, Uttarakhand (248159)
+91-8755574448 , +91-7409707154
info@ensino.in
7
INTRODUCTION
My four-week internship on Python programming was a valuable learning experience that helped me
strengthen my foundation in programming and problem-solving. Python, being one of the most
versatile and beginner-friendly languages, allowed me to explore a wide range of concepts and
practical applications in a structured manner.
During the internship, I started with the basics of Python, including understanding different data
types, variables, operators, and expressions. Gradually, I learned about control structures such as
conditional statements and loops, which are essential for decision-making and repetition in programs.
I also explored the concept of functions in detail, learning how to define, call, and use them
effectively for modular programming.
As the weeks progressed, I worked with lists, tuples, sets, and dictionaries, which improved my
knowledge of data handling. I gained practical exposure to string operations, file handling, and
exception handling, which are important for building real-world programs. The internship also
introduced me to the concept of modules and libraries, enabling me to understand how Python
supports reusability and simplifies complex tasks.
Alongside theoretical learning, I was assigned coding exercises and small projects that allowed me to
apply the concepts in practice. These tasks helped me improve my logical thinking, debugging skills,
and coding efficiency. I also understood the importance of writing clean and structured code,
following Python’s best practices.
Overall, the internship not only provided me with technical knowledge but also gave me confidence to
solve problems independently and use Python in various domains such as automation, data handling,
and application development.
8
WEEK 1
What is Python?
Python is a high-level, interpreted programming language created by Guido van Rossum
and first released in 1991. It's designed with an emphasis on code readability and
simplicity, making it an excellent choice for both beginners and experienced developers.
Python's philosophy follows the principle of "batteries included," meaning it comes with a
comprehensive standard library that provides tools for many common programming tasks.
Its simple syntax resembles natural language, making it an excellent choice for beginners.
With an extensive standard library and a vibrant community, Python is widely used in
various domains such as web development, data science, artificial intelligence,
automation, and more.
Features Of Python
Simple and Easy to Learn: Unlike many other programming languages that require
extensive boilerplate code (e.g., semicolons, brackets), Python uses indentation to define
blocks of code, which enhances readability. The language reads almost like English,
which reduces the learning curve significantly.
Interpreted Language: Python is an interpreted language, which means that code is
executed line by line by the Python interpreter at runtime, rather than being compiled
into machine code beforehand. This allows for easier debugging and testing, as errors are
shown immediately upon execution.
Dynamically Typed: In Python, you don't need to declare the data type of a variable
when you create it. The interpreter automatically detects the type at runtime.
9
Extensive Standard Library: Python comes with a powerful and broad standard library
that provides built-in modules for common tasks such as file I/O, regular expressions,
data serialization, and more.
Interactive Mode: Python supports an interactive mode where users can execute code
line-by-line using the command-line interpreter. This is especially useful for testing
snippets of code, experimenting with libraries, or debugging.
Python Syntax
Python syntax can be executed by writing directly in the command line.
Or by creating a Python file on the server, using the .py file extension and running it in
the command line
Quotation in Python
Python accepts single ('), double (") and triple (''' or """) quotes to denote string literals, as long
as the same type of quote starts and ends the string.
The triple quotes are used to span the string across multiple lines. For example, all the following
are legal −
10
Python Comments
Creating a Comment: Comments starts with # and python will ignore them.
Python Variables
In Python, variables are used to store data values. You don't need to declare a variable
with a specific data type, as Python automatically determines the type based on the value
assigned to the variable.
11
Python Number
In Python, numbers can be of different types: integers, floating-point numbers, and
complex numbers. Here’s a breakdown of each:
o Example: 2 + 3j, 4 + j
Datatypes Of Python
12
Data Type Conversion in Python
Data type conversion means converting a value from one data type to another. For example,
converting a string ("123") to an integer (123), or an integer (10) to a float (10.0).
Example: a = 10 # int
b = 2.5 # float
Double Conversion
Double conversion refers to converting a value from one data type to another and then again to a
third type, or converting back and forth between two types
Example: a = '12.12'
13
WEEK 2
Operators In Python
The operator is a symbol that performs a specific operation between two operands, according
to one definition. Python has some operators, and these are given below –
o Arithmetic Operators
o Comparison (relational) Operators
o Assignment Operators
o Logical Operators
o Bitwise Operators
o Membership Operators
o Identity Operators
Arithmetic Operators
Comparison Operators
Comparison operators mainly use for comparison purposes. Comparison operators compare the values
of the two operands and return a true or false Boolean value in accordance.
14
Assignment Operators
Using the assignment operators, the right expression's value is assigned to the left operand.
15
Bitwise Operators
The two operands' values are processed bit by bit by the bitwise operators .
Logical Operators
are used to combine multiple conditions and produce a final True or False result.
Membership Operators
The membership of a value inside a Python data structure can be verified using Python membership
operators. The result is true if the value is in the data structure; otherwise, it returns false
16
Identity Operators
They are used to compare memory locations of two objects — whether they are the same object in
memory (not just equal in value).
The if statement
The if statement is used to test a particular condition and if the condition is true, it executes a block of
code known as if-block. The condition of if statement can be any valid logical expression which can
be either evaluated to true or false.
17
The if-else statement
The if-else statement provides an else block combined with the if statement which is executed
in the false case of the condition.
If the condition is true, then the if-block is executed. Otherwise, the else-block is executed
if condition:
#block of statements
else:
18
The elif statement
The elif statement enables us to check multiple conditions and execute the specific block of
statements depending upon the true condition among them. We can have any number of elif
statements in our program depending upon our need. However, using elif is optional.
The elif statement works like an if-else-if ladder statement in C. It must be succeeded by an if
statement.
19
Loops in Python
Loops in Python are used to repeat actions efficiently. The main types are For loops (counting
through items) and While loops (based on conditions). In this article, we will look at Python
loops and understand their working with the help of examples.
1. For Loop
For loops is used to iterate over a sequence such as a list, tuple, string or range. It allow to
execute a block of code repeatedly, once for each item in the sequence.
20
Example:
n=4
print(i)
Output
0
2. While Loop
In Python, a while loop is used to execute a block of statements repeatedly until a given
condition is satisfied. When the condition becomes false, the line immediately after the loop in
the program is executed.
Example;
Count=1
while (count<5):
count =count +1
print("Thank you!")
21
3. Infinite While Loop
If we want a block of code to execute infinite number of times then we can use the while loop
in Python to do so.
The code given below uses a 'while' loop with the condition "True", which means that the
loop will run infinitely until we break out of it using "break" keyword or some other logic.
4. Nested Loops
Python programming language allows to use one loop inside another loop which is
called nested loop. Following section shows few examples to illustrate the concept.
22
WEEK 3
Loop Control Statements
Loop control statements change execution from their normal sequence. When execution leaves a
scope, all automatic objects that were created in that scope are destroyed. Python supports the
following control statements.
Continue Statement
The continue statement in Python returns the control to the beginning of the loop.
Example:
Break Statement
The break statement in Python brings control out of the loop.
Example:
break
Pass Statement
We use pass statement in Python to write empty loops. Pass is also used for empty control
statements, functions and classes.
Example:
pass
23
print('Last Letter :', letter)
What is a Function?
1. Built-in Functions
Examples:
2. User-defined Functions
Example:
def greet(name):
return f"Hello, {name}!"
print(greet("Alice")) # Hello, Alice!
24
Function Definition
Syntax:
def function_name(parameters):
"""Optional docstring: explains what the function does"""
# function body
return value # optional
Function Calling
To call a function, you just use its name followed by parentheses ().
print(result)
Pass by Value → A copy of the actual value is passed. Changes inside the function
do not affect the original variable.
Pass by Reference → A reference (address) to the variable is passed. Changes inside
the function affect the original variable.
25
WEEK 4
PYTHON - OBJECT ORIENTED PROGRAMMING
o Class
o Object
o Method
o Inheritance
o Polymorphism
o Data Abstraction
o Encapsulation
Class
The class can be defined as a collection of objects. It is a logical entity that has some specific
attributes and methods. For example: if you have an employee class, then it should contain an
attribute and method, i.e. an email id, name, age, salary, etc.
Object
The object is an entity that has state and behavior. It may be any real-world object like the
mouse, keyboard, chair, table, pen, etc.
Everything in Python is an object, and almost everything has attributes and methods. All
functions have a built-in attribute __doc__, which returns the docstring defined in the
function source code.
Method
26
The method is a function that is associated with an object. In Python, a method is not unique
to class instances. Any object type can have methods.
Inheritance
Inheritance is the most important aspect of object-oriented programming, which simulates the
real-world concept of inheritance. It specifies that the child object acquires all the properties
and behaviors of the parent object.
By using inheritance, we can create a class which uses all the properties and behavior of
another class. The new class is known as a derived class or child class, and the one whose
properties are acquired is known as a base class or parent class.
Polymorphism
Polymorphism contains two words "poly" and "morphs". Poly means many, and morph
means shape. By polymorphism, we understand that one task can be performed in different
ways. For example - you have a class animal, and all animals speak. But they speak
differently. Here, the "speak" behavior is polymorphic in a sense and depends on the animal.
So, the abstract "animal" concept does not actually "speak", but specific animals (like dogs
and cats) have a concrete implementation of the action "speak".
Encapsulation
27
Data Abstraction
Data abstraction and encapsulation both are often used as synonyms. Both are nearly
synonyms because data abstraction is achieved through encapsulation.
Abstraction is used to hide internal details and show only functionalities. Abstracting
something means to give names to things so that the name captures the core of what a
function or a whole program does.
_module_ - Module name in which the class is defined. This attribute is "main" in interactive
mode.
_bases _ - A possibly empty tuple containing the base classes, in the order of their occurrence in
the base class list
28
Conclusion
During my four-week internship on Python Core, I gained a strong foundation in the
fundamentals of Python programming. I learned about data types, operators, conditional
statements, loops, functions, and the concept of modular programming. I also explored
important concepts like pass by value/reference, recursion, lambda functions, and built-in
modules, which helped me understand how Python simplifies problem-solving.
This internship not only enhanced my technical skills but also improved my logical thinking
and problem-solving abilities. By working on practical examples and small projects, I
experienced how Python can be applied in real-world scenarios. Overall, this training
provided me with confidence in writing clean, efficient code and has laid the groundwork for
advancing into more specialized areas such as data analysis, web development, or machine
learning in the future.
29
References
1. Python Software Foundation. Python 3 Documentation. Available at:
https://docs.python.org/3/
2. Reitz, K., & Schlusser, T. (2016). The Hitchhiker’s Guide to Python: Best Practices
for Development. O’Reilly Media.
3. Sweigart, A. (2019). Automate the Boring Stuff with Python (2nd Edition). No Starch
Press.
4. Lutz, M. (2013). Learning Python, 5th Edition. O’Reilly Media.
5. TutorialsPoint. Python Tutorial. Available at: https://www.tutorialspoint.com/python/
6. W3Schools. Python Tutorial. Available at: https://www.w3schools.com/python/
30