SSSSKKKKKK
SSSSKKKKKK
SSSSKKKKKK
OF
INDUSTRIAL TRAINING
24-07-2023 TO 19-08-2023
DEPARTMENT
OF
COMPUTER ENGG.
SUBMITTED BY:
ANISH MALHOTRA
SBRN: 220730204002
TABLE OF CONTENT
Python Introduction
Python Syntax
Python comments
Python variable
Python Data Types
Python strings
Python Booleans
Python Operator
Python Lists
Python Tuples
Python Sets
Python Control Statement
Python Function
Python introduction
What is Python?
• Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.
• It is used for:
• web development (server-side),
• software development,
• mathematics,
• system scripting.
What can Python do?
• Python can be used on a server to create web applications.
• Python can be used alongside software to create workflows.
• Python can connect to database systems. It can also read and modify files.
• Python can be used to handle big data and perform complex mathematics.
Python Syntax :-
Syntax of python language is very simple and easy. For e.g:-
print(“Hello, World!”)
OUTPUT :- Hello, World!
Python Comments :-
Comments can be used to explain code written in a programming language.
Comments are used to make the code more
readable.
Comments can be used to prevent execution when testing code.
In Python comments can be single-line or multi-line
For e.g:-
#This is a comment
#written in
#more than just one line
print("Hello, World!")
Python Variables:-
The functions which are come along with python itself are called a built in function or
predefined function. Built in function are like:- range(), id() , type(), input() etc .
Example:-python range function generates the immutable sequence of numbers starting from the given
start integer to the stop integer.
User-defined function:-
Functions which are created by programmer according to the requirement are called a user
defined function.
Example of simple create function:-
def sample ():
x=10
print(x)
sample ()
Simple example of call function :-
def add(a,b): # define function and add parameters
sum=a+b #third variable add the value
return sum #use return statements
a=int(input(“enter 1st value:-”) #user input values
b=int(input(“enter 2nd value:-”) # user input values
c=add(a,b) #call function
Print(“the result is :-”,c) # print value
Project:-
Output:-
Thankyou…..
End
of presentation