ppt for seminar for pyrhon etc and the semiar of college

ashusharmajan2018 12 views 21 slides Jul 04, 2024
Slide 1
Slide 1 of 21
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21

About This Presentation

Python


Slide Content

PRESENTAION ON PYTHON Submitted By: Submitted To Priyanka Sharma Branch:CSE Naveen Dabley Semester :3 rd Lecturer, CSE GPC Jhalawar GPC Jhalawar 1

TRAINING DETAILS Training Institute : CEG Jaipur Mode of Training : Online Starting Date : 04-07-2022 End Date : 04-08-2022 2

TOPICS TO BE DISCUSSED Introduction & Installation Python Python History & Version Python Features Python Application Variable Keywords Data Type List & Tuples Python Loop Operator 3

Introduction Python  is a popular programming language. Python is a dynamic, interpreted language.  It was created by Guido van Rossum , It was released in 1991. 4

Installation python Visit the link https://www.python.org/downloads/ Step1:Select the python version to download. Step2: Click on the download button. Step3: Click on the install now. Step4: Installation in process. 5

PYTHON HISTORY Python was  conceived in the late 1980s by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands  as a successor to the ABC programming language. 6

Version There are two major python versions- Python 0.9.0 (Feb 1991) Python 1.0 (1994) Python 2.0(Oct 2000) Python 3.0(Dec 2008) 7

Python Features Easy to Learn and Use – Less development time Expressive Language Free and Open Source Large Standard Library Portable - works on Windows/Linux/Mac 8

Python Application 1) Web Applications 2) Desktop GUI Applications 3) Software Development 4) Business Applications 5) 3D CAD Applications 6) Scientific and Numeric 7) Audio or Video-based Applications 9

Variable Variable is a container to store a value. Rules to define variable A variable name can contain alphabets, digit and underscore. A variable name can only start with an alphabet and underscore. A variable can’t start is allowed to be used inside a variable name. Eg . Gpc , Gpc2, Gpc_12 etc. 10

Keywords Keywords are reserved word in python. These reserved words can’t be used as function name or any identifier. 11

12 Data Type Data type determine the type of data a variable will hold. Every variable which is used in the program must be declared as what data-type it is. Data type specify how and what type of data enter in our program. Python provide various standard data types that define the storage method on each of then. 12

13 13 Example Int.: 2,5,20 Complex no.: 3+2 Float: 2.5,1.8 Boolean: True/False Str.: GPCJH Tuple :(3, 3.5,’b’)

List & Tuples List Python Lists are containers to store a set of values of any data type. The list can contain different types of elements such as int , float , string , Boolean , etc . List method: 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 14

Tuples Tuples are a data structure that is similar to that of lists in Python but are often lesser-known or interacted with . They share the same characteristics of lists in that they are ordered and indexable but they different in that they are immutable and that they are created using () notation rather than [] notation . Tuple method: Count (_) :- It will return the number of times1occurs Index(_) :- It will return the index of the first occurrence of 1 15

Python Loop We can run a single statement or set of statements repeatedly using a loop command . The following sorts of loops are available in the Python programming language. While loop: while (expression )  { statements increment/decrement statement } For loop: Syntax of for Loop for  value  in  sequence:       {loop body}    16

17

Python Operators The operator can be defined as a symbol which is responsible for a particular operation. Operands1 Operator Operands2 Ex. a+b 18

Types of operators: 1. Arithmetic Operators : (+, -, *, /, %, //). 2. Comparison operator : (==, >=, <=, >, <, !=). 3. Assignment Operator : (=, +=, -=). 4. Logical Operator: (and, or, not) 5. Identity Operators: (is, is not) 6. Membership Operators: (in, not in). 19

Program To Subtract No. a=input(“Enter the first number\n”) b= input(“Enter the second number\n”) a= int (a) b= int (b) Print(“Subtract of your given number is ”,a-b) Output Enter the first number 8 Enter second number 5 Subtraction of your given number is :3 20

REFERENCE https://www.w3schools.com/python/ https://www.tutorialspoint.com/python/python_variable_types.htm https://www.javatpoint.com/python-data-types 21