Enternship Report On Phython
Enternship Report On Phython
Training Report
ON
“PYTHON”
SUBMITTED BY:
Rajeshwar tripathi (1813310153)
Prateek Tiwari(1813310143)
SUBMITTED TO:
1
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
NOIDA INSTITUE OF ENGINEERING AND TECHNOLOGY,
GREATER NOIDA
INDEX
1. Acknowledgement 3
2. Python 4
5. Applications 14
6. Conclusion 15
2
ACKNOWLEDGEMENT
Rajeshwar tripathi
3
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 readability, and its
syntax allows programmers to express concepts in
fewer lines of code.
It is used for:
Web development(server-side),
Software development,
Mathematics
4
PYTHON FEATURES:-
Easy-to-learn
• Easy-to-read
• Easy-to-maintain
• A broad standard library
• Interactive Mode
• Portable
• Extendable
• Databases
• GUI Programming
• Scalable
Getting Python:-
The most up-to-date and current source code,
binaries, documentation, news, etc., is available on
the official website of Python
https://www.python.org/
5
First Program in Python:-
Python Identifiers
A Python identifier is a name used to identify a
variable, function, class, module or other object.
6
Variables
• Variables are reserved memory locations to store
values. This means that when you create a variable
you reserve some space in memory.
• Based on the data type of a variable, the interpreter
allocates memory and decides what can be stored in
the reserved memory. Therefore, by assigning
different data types to variables, you can store
integers, decimals or characters in these variables.
8
Lists
• Lists are the most versatile of Python's compound
data types. A list contains items separated by commas
and enclosed within square brackets ([]). To some
extent, lists are similar to arrays in C. One difference
between them is that all the items belonging to a list
can be of different data type.
• The values stored in a list can be accessed using the
slice operator ([ ] and [:]) with indexes starting at 0 in
the beginning of the list and working their way to end
-1. The plus (+) sign is the list concatenation operator,
and the asterisk (*) is the repetition operator. For
example
9
Tuples
• A tuple is another sequence data type that is similar to
the list. A tuple consists of a number of values separated
by commas. Unlike lists, however, tuples are enclosed
within parentheses.
• The main differences between lists and tuples are: Lists
are enclosed in brackets ( [ ] ) and their elements and size
can be changed, while tuples are enclosed in parentheses (
( ) ) and cannot be updated. Tuples can be thought of as
read-onlylists. For example:-
10
Dictionary
• Python's dictionaries are kind of hash table type.
They work like associative arrays or hashes found in
Perl and consist of key-value pairs. A dictionary key
can be almost any Python type, but are usually
numbers or strings. Values, on the other hand, can be
any arbitrary Python object.
• Dictionaries are enclosed by curly braces ({ }) and
values can be assigned and accessed using square
braces ([]). For example
11
Python Operators
Operators are used to perform operations on
variables and values.
Python divides the operators in the following groups:
Arithmetic operators
Assignment operators
Comparison operators
Logical operators
Identity operators
Membership operators
Bitwise operators
12
Else: The else keyword catches anything which isn't
caught by the preceding conditions.
Python Loops
Python has two loop commands:
• while loops
• for loops
While Loops:-
• A while loops statement in Python programming
language repeatedly executes a target statement
as long as a given condition is true
13
Application of python:
1. Text Handling
2. System Administration
3. GUI programming
4. Database Apps
5. Scientific Applications
6. Games
7. Natural Language processing(NLP)
14
CONCLUSION
Python is very effective language and easy to use among all the
programming languages in computer. In python the code is easily
understandable to the person as it is human readable language.
Python focus on readability, coherence, and software quality in
general apart from other tools in scripting world. The uniformity of
the python code makes it easy to understand even if you did not
write it.
In addition python has deep support for more advance
software reuse mechanism, such as OOP.
PYTHON boost developer productivity many times beyond
compile or statically typed language such as C, C++, and JAVA.
Python code is typically one third to one fifth the size of equivalent
C++ or JAVA code.
15