[go: up one dir, main page]

0% found this document useful (0 votes)
70 views15 pages

Enternship Report On Phython

This document is a training report on Python submitted by three students. It includes an index, acknowledgements, and sections on Python, its features, data structures, operators, conditions/if statements, loops, and applications. Python is described as an easy to learn, high-level programming language designed for code readability. Its standard data types include numbers, strings, lists, tuples, and dictionaries.

Uploaded by

Randheer Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views15 pages

Enternship Report On Phython

This document is a training report on Python submitted by three students. It includes an index, acknowledgements, and sections on Python, its features, data structures, operators, conditions/if statements, loops, and applications. Python is described as an easy to learn, high-level programming language designed for code readability. Its standard data types include numbers, strings, lists, tuples, and dictionaries.

Uploaded by

Randheer Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

A

Training Report
ON
“PYTHON”

SUBMITTED BY:
Rajeshwar tripathi (1813310153)

Ram Kumar Shukla (1813310154)

Prateek Tiwari(1813310143)

SUBMITTED TO:

Mr. Mayank Deep Khare

(Computer Science Department)

1
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
NOIDA INSTITUE OF ENGINEERING AND TECHNOLOGY,

GREATER NOIDA

INDEX

S. No. TITLE Pg No.

1. Acknowledgement 3

2. Python 4

3. Python features 5-7

4. Python Data Structure 8-13

5. Applications 14

6. Conclusion 15

2
ACKNOWLEDGEMENT

I would like to express my special thanks of


Gratitude to my python faculties for their able
guidance and support in completing my report.
I would also like to extend my gratitude to the
DEAN, and H.O.D. for providing me with all the
facility that was required.

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:-

>>> print “Hello, My name is Python !”


Python files have extension .py. Type the following
source code in a test.py

Python Identifiers
A Python identifier is a name used to identify a
variable, function, class, module or other object.

Rules for naming ‘Identifiers’:-


 An identifier starts with a letter A to Z or a to z or
an underscore (_) followed by zero or more
letters, underscores and digits (0 to 9).
 Punctuation characters such as @, $, and %
within Python are not allowed.

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.

Standard Data Types


Python has five standard data types −
• Numbers
• String
• List
• Tuple
• Dictionary
7
Strings
Strings in Python are identified as a contiguous set of
characters represented in the quotation marks.
Python allows for either pairs of single or double
quotes. Subsets of strings can be taken using the slice
operator ([ ] and [:] ) with indexes starting at 0 in the
beginning of the string and working their way from -1
at the end.
• The plus (+) sign is the string concatenation operator
and the asterisk (*) is the repetition operator. For
example

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

Python Conditions and If statements


If: An "if statement" is written by using
the if keyword.
Elif: The elif keyword is pythons way of saying "if the
previous conditions were not true, then try this
condition".

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

You might also like