A REPORT OF ONE MONTH TRAINING REPORT At
INFOSYS SPRINGBOARD ONLINE PLATFORM
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE AWARD OF
THE DEGREE OF
BACHELOR OF TECHNOLOGY
(INFORMATION TECNOLOGY)
JULY, 2023
SUBMITTED BY:
HARPREET SINGH
DEPARTMENT OF INFORMATION TECHNOLOGY
GURU NANAK DEV ENGINEERING COLLEGE LUDHIANA
(An Autonomous College under UGC ACT)
CANDIDATE’S DECLARATION
I “HARPREET SINGH” declare that I have undertaken one month training “Python Foundation
Certification Course” during a period from 03 July 2023 to 31 July 2023 in partial fulfillment
of requirements for the award of degree of B.Tech (INFORMATION TECHNOLOGY) at
GURU NANAK DEV ENGINEERING COLLEGE, LUDHIANA. The work is being
presented
in the training report submitted to Department of INFORMATION TECHNOLOGY at
GURU NANAK DEV ENGINEERING COLLEGE, LUDHIANA is an authentic record of
training work.
Signature of student:
The industrial training viva-voice Examination of has been held on
and accepted.
Signature of Internal examiner Signature of external examiner
ABSTRACT
Today this modern era is world of technology and we cannot achieve anything in this field until
or unless theoretical education acquired in classroom is effectively wedded to its practical
approach. Doing one month training at Infosys Springboard online platform helps me in better
understanding and implementation of theoretical knowledge that I gained. During This period I
have studied various concepts about python programming language. We studied about the
desktop applications both theoretical as well as practical and also learned the programming and
how to create a desktop application.
ACKNOWLEDGEMENT
We are highly grateful to Dr. Sehajpal Singh, Director, GNDEC, Ludhiana, for providing us this
opportunity to carry out one month training at Infosys Springboard online platform. We express
gratitude to Prof. KS MANN (HOD,IT) for their intellectual support.
We would like to express our deep sense of gratitude and thank profusely to course instructor at
Infosys who instructed us and assisted us during the training period. We also thanks to the
programming department for provision of excellent all the latest equipment’s and resources for
us to utilize. Training here was itself true learning experience which is going to help us
immensely in our career.
ABOUT THE INSTITUTION
Infosys Springboard is a flagship intervention
to empower people, communities, and society.
Through this initiative, Infosys plans to
empower over 10 million learners with digital
and life skills by 2025. The reach will include
students across India in the age group of 10-22
years as well as lifelong learners. The content
hosted on this platform is aligned with New
Education Policy 2020. It helps the learners
get access to a variety of topics that also
include professional and vocational skills.
CONTENTS
Topic Page No.
Certificate by Company/Industry/Institute i
Candidate’s Declaration ii
Abstract iii
Acknowledgement vi
About the institute v
List of Figures vi
CHAPTER 1 INTRODUCTION 1-16
1.1 Overview of Python Programming 1
1.2 Features of Python 1
1.3 Variables and Data types 3
1.4 Strings 5
1.5 List & Tuples 6
1.6 Dictionary 7
1.7 Conditional Expression 8
1.8 Loops 11
1.9 Function & Recursion 14
17
CHAPTER 2 (Result & Discussion)
3.1 Result
3.2 Discussion
CHAPER 3 (CONCLUSION & FUTURE SCOPE) 18-19
4.1 Conclusion
4.2 Future Scope
REFERENCE
20-21
25
CHAPTER 1 - INTRODUCTION
1.1 OVERVIEW OF PYTHON PROGRAMMING:
Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed
to be highly readable. It uses English keywords frequently where as other languages use punctuation, and
it has fewer syntactical constructions than other Python was developed by Guido van Rossum in the late
eighties and early nineties at the National Research Institute for Mathematics and Computer Science in the
Netherlands.
1.2 Features Of PYHTON
Features of a language are nothing but the set of services or facilities provided by the languagevendors to
the industry programmers. Some important features are:
Easy-to-learn: Python has few keywords, simple structure, and a clearly defined syntax. This allows the
student pick up the language quickly.
Portable: Python can run on a wide variety of hardware platforms and has the same interface on all
platforms.
Object-oriented: Everything is considered to be an Object which possess some state, behavior andall the
operations are performed using these objects.
1
Secured: All the code is converted in bytecode after compilation, which is not readable by a
human and java does not use an explicit pointer. It enables to develop virus-free, tamper-free
system/applications. Dynamic: Python provides a better structure and support for large
programs than shell scripting.
Easy-to-read: Python code is more clearly defined and visible to the eyes.
Easy-to-maintain: Python's source code is fairly easy-to-maintained.
A broad standard library: Python's bulk of the library is very portable and cross platform compatible on
UNIX, Windows, and Macintosh.
Extendable: You can add low-level modules to the Python interpreter. These modules enable
programmers to add to or customize their tools to be more efficient. Databases: Python provides
interfaces to all major commercial databases.
Scalable: Python provides a better structure and support for large programs than shell scripting.
GUI Programming: Python supports GUI applications that can be created and ported to many system
calls, libraries and windows systems, such as Windows MFC, Macintosh, and the X Window system of
Unix.
2
fig. 1.1 Features of Python
1.3 Variables & Data Types
VARIABLES
A Python variable is a reserved memory location to store values. In other words, a variable in a python
program gives data to the computer for processing.
Rules for defining a variable name: (Also applicable to other identifiers)
• A variable name can contain alphabets, digits, and underscore.
• A variable name can only start with an alphabet and underscore.
• A variable can’t start with a digit.
• No white space is allowed to be used inside a variable name.
3
Examples of few valid variable names,
one8, _akki, aakash,_bro, etc.
DATA TYPES:
Data types are the classification or categorization of data items. It represents the kind of value that tells
what operations can be performed on a particular data. Since everything is an object in Python
programming, data types are actually classes and variables are instance (object) of these classes.
Primarily there are the following data types in Python:
• Integers
• Floating point numbers
• Strings
• Booleans
• None
Operators in Python
Operators are the constructs which can manipulate the value of operands.
Consider the expression 4 + 5 = 9. Here, 4 and 5 are called operands and + is called operator.
The following are some common operators in Python:
• Arithmetic Operators (+, -, *, /, etc.)
• Assignment Operators (=, +=, -=, etc.)
• Comparison Operators (==, >=, <=, >, <, !=, etc.)
• Logical Operators (and, or, not)
1.4 Strings
4
The string is a data type in Python. A string is a sequence of characters enclosed in quotes. In
Python, Strings are arrays of bytes representing Unicode characters. However, Python does not have
a character data type, a single character is simply a string with a length of 1. Square brackets can be
used to access elements of the string
We can primarily write a string in three ways:
• Single quoted strings: a = ‘harry’
• Double quoted strings: b = “harry”
• Triple quoted strings: c = ‘’’ harry ‘’’
String Functions
Some of the most used functions to perform operations on or manipulate strings are:
• len() function : It returns the length of the string.
• endswith(“rry”) : This function tells whether the variable string ends with the string “rry” or not. If
string is “harry”, it returns for “rry” since harry ends with rry.
• count(“c”) : It counts the total number of occurrences of any character.
• capitalize() : This function capitalizes the first character of a given string.
• find(word) : This function finds a word and returns the index of first occurrence of that word in
the string.
1.5 List & Tuples
5
List
Lists are containers to store a set of values of any data type. List in Python are ordered and have a definite
count. The elements in a list are indexed according to a definite sequence and the indexing of a list is done
with 0 being the first index. Each element in the list has its definite place in the list, which allows
duplicating of elements in the list, with each element having its own distinct place and credibility. Lists in
Python can be created by just placing the sequence inside the square brackets[].
Example :- friends = [‘Apple’, ‘Akash’, ‘Rohan’, 7, False]
The list can contain different types of elements such as int, float, string, Boolean, etc. Above list is a
collection of different types of elements.
List Methods
Consider the following list:
Example: - L1 = [1, 8, 7, 2, 21, 15]
1. sort() – updates the list to [1,2,7,8,15,21]
2. reverse() – updates the list to [15,21,2,7,8,1]
3. append (8) – adds 8 at the end of the list
4. insert(3,8) – This will add 8 at 3 index
5. pop(2) – It will delete the element at index 2 and return its value
6. remove(21) – It will remove 21 from the last
Tuples
A tuple is an immutable (can’t change or modified) data type in Python. A Tuple is a collection of Python
objects separated by commas. In some ways a tuple is similar to a list in terms of indexing, nested objects
and repetition but a tuple is immutable unlike lists which are mutable.
6
Tuple methods:
Consider the following tuple,
Example: - a = (1, 7, 2)
1. count (1) – It will return the number of times 1 occurs in a.
2. index (1) – It will return the index of the first occurrence of 1 in a.
1.6 Dictionary
Dictionary
Dictionary is a collection of key-value pairs. Key-value is provided In the dictionary to make it more
optimized.
Properties of Python Dictionaries
• It is unordered
• It is mutable
• It is indexed
• It cannot contain duplicate keys
Dictionary Methods
Consider the following dictionary,
a = {“name”: “Harshit Singh”,
“from”: “India”,
“marks”: [92,98,96]}
7
1. items() : returns a list of (key,value) tuple.
2. keys() : returns a list containing dictionary’s keys.
3. update({“friend”: “Sam”}) : updates the dictionary with supplied key-value pairs.
4. get(“name”) : returns the value of the specified keys (and value is returned e.g., “Harry” is
returned here)
1.7 Conditional Expression
Sometimes we want to play pubg on our phone if the day is Sunday.
Sometimes we order Ice-cream online if the day is sunny.
Sometimes we go hiking if our parents allow.
All these are decisions that depend on the condition being met.
In python programming too, we must be able to execute instructions on a condition(s) being met. This is
what conditions are for!
If else and elif in Python
If else and elif statements are a multiway decision taken by our program due to certain conditions in our
code.
Syntax:
'''
if (condition1): // if condition 1 is true
print(“yes”)
elif (condition2): // if condition 2 is true
8
print(“No”)
else: // otherwise
print(“May be”)
'''
Code example:
a = 22
if (a>9):
print(“Greater”) else:
print(“lesser”)
elif clause elif in python means [else if]. If statement can be chained together with a lot of these
elif statements followed by an else statement.
Syntax:
'''
if (condition1):
#code
elif (condition 2):
#code
elif (condition 2):
#code
….
else:
9
#code '''
• The above ladder will stop once a condition in an if or elif is met.
Important Notes:
• There can be any number of elif statements.
• Last else is executed only if all the conditions inside elifs fail.
1.8 Loops
Sometimes we want to repeat a set of statements in our program. For instance: Print 1 to 1000 Loops
make it easy for a programmer to tell the computer, which set of instructions to repeat, and how!
Types of loops in Python
Primarily there are two types of loops in Python
• While loop
• For loop
While Loop
The syntax of a while loop looks like this:
''' while condition:
#Body of the loop '''
The block keeps executing until the condition is true/false
• In while loops, the condition is checked first. If it evaluates to true, the body of the loop is
executed, otherwise not!
• If the loop is entered, the process of condition check and execution is continued until the condition
becomes false.
10
For Loop
A for loop is used to iterate through a sequence like a list, tuple, or string (iterables).
The syntax of a for loop looks like this:
l = [1, 7, 8]
for item in l:
print(item)
This program will print 1,7,8
Range function in Python
The range function in python is used to generate a sequence of numbers.
We can also specify the start, stop, and step-size as follows:
range(start, stop, step_size)
step size is usually not used with range()
For loop with else
An optional else can be used with a for loop if the code is to be executed when the loop exhausts.
Example:
l = [1, 7, 8]
for item in l:
print(item)
else:
print(“Done”) #This is printed when the loop exhausts!
11
Output:
Done
The break statements
‘break’ is used to come out of the loop when encountered. It instructs the program to – Exit the loop
now.
Example:
for i in range(0, 80):
print(i) #This will print 0, 1, 2 and
3 if i == 3: break
The continue statement
‘continue’ is used to stop the current iteration of the loop and continue with the next one. It instructs the
program to “skip this iteration.”
Example:
for i in range(4):
print(“printing”)
if i == 2: #if i is 2, the iteration is skipped
continue
12
print(i)
pass statement
pass is a null statement in python. It instructs to “Do nothing.”
Example:
l = [1, 7, 8]
for item in l:
pass #without pass, the program will throw an error
1.9 Function & Recursion
A function is a group of statements performing a specific task. When a program gets bigger in size and its
complexity grows, it gets difficult for a programmer to keep track of which piece of code is doing what!
A function can be reused by the programmer in a given program any number of times.
Example and Syntax of a function: -
def func1():
print(“Hello”)
This function can be called any number of times, anywhere in the program.
Function call
Whenever we want to call a function, we put the name of the function followed by parenthesis as
follows:
func1() #This is called function call
Function definition
The part containing the exact set of instructions that are executed during the function call.
13
Types of functions in Python
There are two types of functions in Python:
• Built-in functions #Already present in Python
• User-defined functions #Defined by the user
Examples of built-in function includes len(), print(), range(), etc.
The func1() function we defined is an example of a user-defined function.
Functions with arguments
A function can accept some values it can work with. We can put these values in the parenthesis. A
function can also return values.
Recursion
Recursion is a function which calls itself. It is used to directly use a mathematical formula as a
function.
EXAMPLE: - factorial(n) = n * factorial (n-1
14
CHAPTER - 2 (RESULT AND DISCUSSION)
3.1 Result
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming
language. It was created by Guido van Rossum during 1985- 1990. Like Perl, Python source code is also
available under the GNU General Public License (GPL).
As a general-purpose programming language, Python is designed to be used in many ways. You can build
web sites or industrial robots or a game for your friends to play, and much more, all using the same core
technology.
Python’s flexibility is why the first step in every Python project must be to think about the project’s
audience and the corresponding environment where the project will run. It might seem strange to think
about packaging before writing code, but this process does wonders for avoiding future headaches.
3.2 Discussion
Discussions are focused on providing comprehensive information about a specific topic.
• Deploying Python applications
• pip vs easy_install
Chapter-3 (CONCLUSION AND FUTURE SCOPE)
15
4.1 Conclusion
I believe the trail has shown conclusively that it is both possible and desirable to use python as the
principal technique language:
- It is free (as in both cost and source code).
- It is trivial to install on a Window PC allowing students to take their interest further. For many the
hurdle of installing a Pascal or C compiler on a windows machine is either too expensive or too
complicated;
- It is a flexible tool that allows both the teaching of traditional procedural programming and modern
OOP; It can be used to teach a large number of transferable skills;
- It is a real- world programming language that can be and is used in academia and the commercial
world;
- It appears to be quicker to learn and, in combination with its many libraries, this offers the possiblity
of more rapid student development allowing the course to be made more challenging and varied;
- and most importantly, its clean syntax offers increased understanding enjoyment for students;
4.2 Future Scope
This project will help the store keeper, administration etc.in fast billing. Python is a high level and multi-
paradigm programming language designed by Guido van Rossum, a Dutch programmer, having all the
features as conventional programming languages such as C, C++ and Java have.
16
It is one of the fastest growing languages and has undergone a successful span of more than 25 years as
far as its adoption is concerned. This success also reveals a promising future scope of python
programming language.
In fact, it has been continuously serving as the best programming language for application development,
web development, game development, system administration, scientific and numeric computing, GIS and
Mapping etc.
References: -
1. https://infyspringboard.onwingspan.com/web/en/page/home
17
18