Internship
Internship
INTRODUCTION
Python Programming internship was an enriching and transformative experience that allowed
to dive deep into the realm of software development.
The intensive learning experience significantly impacted the coding journey. In just two weeks,
immersed in Python development, gained practical insights, and contributed to real-world projects.
During this immersive internship, worked closely with a talented team of developers who
guided through various aspects of Python programming. From enhancing understanding of Python
syntax and data structures to exploring its versatile libraries and frameworks.
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
Python is a high-level, interpreted programming language that is easy to learn and understand. It was
created in the late 1980s by Guido van Rossum and was first released in 1991.
FEATURES OF PYTHON
1. Easy to Learn: Python has a simple syntax and is relatively easy to learn, making it a great language
for beginners.
2. High-Level Language: Python is a high-level language, meaning it abstracts away many low-level
details, allowing developers to focus on the logic of their program.
3. Interpreted Language: Python code is interpreted line by line, making it easier to debug and test.
4. Object-Oriented: Python supports object-oriented programming (OOP) concepts, such as classes
objects, inheritance, and polymorphism.
5. Cross-Platform: Python can run on multiple operating systems, including Windows, macOS,
and Linux.
6. Large Standard Library: Python has an extensive collection of libraries and modules that make it
easy to perform various tasks.
APPLICATIONS OF PYTHON
• Web Development: Python is used in web development frameworks like Django and Flask.
• Data Analysis and Science: Python is widely used in data analysis, machine learning, and
scientific computing.
• Automation: Python is used for automating tasks, such as data entry and file management.
• Artificial Intelligence and Robotics: Python is used in AI and robotics applications.
• Education: Python is often taught in introductory programming courses.
• 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.
3
OBJECT ORIENTED PROGRAM(OOPS) CONCEPT
Example:
```
class Car:
def __init__(self, color, model):
self.color = color
self.model = model
my_car = Car("red", "Toyota")
```
INHERITANCE
Example:
```
class ElectricCar(Car):
def __init__(self, color, model, battery_capacity):
super().__init__(color, model)
self.battery_capacity = battery_capacity
```
POLYMORPHISM
class Circle(Shape):
def __init__(self, radius):
self.radius = radius
def area(self):
return 3.14 * self.radius ** 2
class Rectangle(Shape):
def __init__(self, width, height):
4
self.width = width
self.height = height
def area(self):
return self.width * self.height
ENCAPSULATION
Example:
```
class BankAccount:
def __init__(self, balance=0):
self.__balance = balance
def get_balance(self):
return self.__balance
account = BankAccount(100)
account.deposit(50)
print(account.get_balance())
```
ABSTRACTION
Example:
```
class CoffeeMachine:
def __init__(self):
self.__water_temp = 0
def make_coffee(self):
self.__heat_water()
self.__mix_coffee()
print("Coffee ready!")
def __heat_water(self):
self.__water_temp = 100
5
def __mix_coffee(self):
print("Mixing coffee...")
```
1. Classes (`class`)
2. Objects (`object()`)
3. Inheritance (`class Child(Parent)`)
4. Polymorphism (`def method(self)`)
5. Encapsulation (`__variable`)
6. Abstraction (`class` with hidden implementation)
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,
6
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.
➢ 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.
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
7
LOGICAL OPERATORS
RELATIONAL OPERATORS
8
FILE INPUT/OUTPUT
When working with files, you need to specify the mode in which you want to open the file:
| Mode | Description |
| --- | --- |
| `r` | Read (default) |
| `w` | Write (overwrite existing file) |
| `a` | Append (add to existing file) |
| `r+` | Read and Write |
| `w+` | Read and Write (overwrite existing file) |
| `a+` | Read and Append |
| `x` | Create new file (fails if file exists) |
| `b` | Binary mode (for non-text files) |
| `t` | Text mode (default) |
OPENING FILES
To work with a file, you need to open it using the `open()` function:
```
file = open("filename.txt", "r")
```
READING FILES
| Method | Description |
| --- | --- |
| `read()` | Read entire file |
| `readline()` | Read one line |
| `readlines()` | Read all lines into a list |
Example:
```
file = open("filename.txt", "r")
content = file.read()
print(content)
file.close()
```
9
WRITING FILES
| Method | Description |
| --- | --- |
| `write()` | Write string to file |
| `writelines()` | Write list of strings to file |
Example:
```
file = open("filename.txt", "w")
file.write("Hello, World!")
file.close()
```
CLOSING FILES
CONTEXT MANAGER
FILE METHODS
| Method | Description |
| --- | --- |
| `seek()` | Move file pointer |
| `tell()` | Get current file pointer |
| `flush()` | Flush file buffer |
| `truncate()` | Truncate file to specified size |
FILE EXCEPTIONS
Be prepared to handle file-related exceptions:
10
| Exception | Description |
| --- | --- |
| `FileNotFoundError` | File not found |
| `PermissionError` | Permission denied |
| `IOError` | Input/Output error |
ADVANTAGES OF PYTHON
EASE OF USE
1. Simple syntax
2. Readable code
3. Forgiving nature (e.g., no need for semicolons)
4. Easy to learn for beginners
FLEXIBILITY
CROSS-PLATFORM COMPATIBILITY
LARGE COMMUNITY
COST-EFFECTIVE
11
1. Free and open-source
2. Reduces development time and costs
3. Easy to maintain and update
4. Lowers total cost of ownership
WEB DEVELOPMENT
AUTOMATION
EDUCATION
INTERNSHIP OUTCOME
12
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,
PROGRAM
class Animal:
def __init__(self, name, species):
13
self.name = name
self.species = species
def make_sound(self):
print("Generic animal sound")
class Dog(Animal):
def make_sound(self):
print("Woof!")
class Cat(Animal):
def make_sound(self):
print("Meow!")
# Data types
animals = ["dog", "cat", "elephant"] # List
ages = (3, 5, 7) # Tuple
weights = {15.5, 20.2, 45.8} # Set
is_wild = {"dog": False, "cat": False, "elephant": True} # Dictionary
OUTPUT
14
Woof!
Whiskers is a Siamese
Meow!
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
18