0% found this document useful (0 votes)
16 views

Spoken Tutorial Python - English

The document provides an introduction and overview of the Python programming language. It discusses some key pluses of Python including its ease of use as an object-oriented language, its interpretive nature, and cross-platform capabilities. It also notes some minuses like slower speed compared to other languages. The document then provides examples of basic Python concepts like data types, operators, and control flow statements. It includes code samples for tasks like swapping values, calculating a sum, finding the largest of three numbers, and printing a multiplication table.

Uploaded by

atul211988
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Spoken Tutorial Python - English

The document provides an introduction and overview of the Python programming language. It discusses some key pluses of Python including its ease of use as an object-oriented language, its interpretive nature, and cross-platform capabilities. It also notes some minuses like slower speed compared to other languages. The document then provides examples of basic Python concepts like data types, operators, and control flow statements. It includes code samples for tasks like swapping values, calculating a sum, finding the largest of three numbers, and printing a multiplication table.

Uploaded by

atul211988
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

PRESENTATION

ON
SPOKEN TUTORIAL PYTHON - ENGLISH

SCHOOL OF COMPUTING
GRAPHIC ERA HILL UNIVERSITY
DEHRADUN – 248001
Presented By:Presented To:
Mayur Singh Pundir Mr. Atul Bhandari
Roll no. – 1021616 Class Coordinator
BCA – VI Sem (B) BCA – VI Sem (B)
INTRODUCTION

Python is an easy – to - learn yet powerful object oriented programming

language. It is a very high level programming language yet as powerful as many

other middle - level not so high - level languages like C, C++, Java etc.
PLUSES OF PYTHON
 Easy to Use OO Language

 Expressive Language

 Interpreted Language

 Its Completeness

 Cross – platform language

 Free and Open Source

 Variety of Usage / Applications


MINUSES OF PYTON
 Not the Fastest language

 Lesser Libraries than C, Java, Perl

 Not Strong on Type – binding

 Not Easily Convertible


SWAP VALU ES
In C++ In Python

int a=2, b=3, temp; a,b = 2,3


temp=a; a,b = b,a
a=b;

b=temp;
Program to obtain 3 numbers and print their sum
num1 = int( input( “Enter number 1 : “))

num2 = int( input( “Enter number 2 : “))

num3 = int( input( “Enter number 3 : “))

sum = num1 + num2 + num3

print(“Three numbers are : “, num1, num2, num3)

print(“Sum is : “, sum)
Built-in core data types
 Numbers(int, float, complex) => +12, -15, 3000

 String => “abcd”, “1234”, “????”, ‘????”

 List => [1,2,3,4,5], [‘a’,’e’,’I’,’o’,’u’]

 Tuple => p=(1,2,3,4,5

 Dictionary => {‘a’:1,’e’:2,’i’:3,’o’:4,’u’:5}


operators
UNARY OPERATORS

+ Unary Plus

- Unary minus

- Bitwise complement

not logical negation


BINARY OPERATORS
Arithmetic Operators Bitwise Operators Shift Operators Logical operators
+ Addition & Bitwise AND << shift left and logical AND
- Subtraction ^ Bitwise exclusive OR(XOR) >> shift right or Logical OR
* * Multiplication | Bitwise OR
/ Division Relational Operators Assignment Operators
% Remainder/modulus < Less than = Assignment
** Exponent > Greater than /= Assign quotient
// Floor division <= Less than or equal to += Assign sum
Identity Operators >= Greater than or equal to *= Assign product
is is the identity same? == Equal to %= Assign remainder
is not is the identity not same? != Not equal to -= Assign difference
Membership Operators **= Assign exponent
in whether variable in sequence //= Assign floor division
not in whether variable not in sequence
Program to print largest among 3 numbers
x=y=z=0
x=float(input(“Enter first number : “))
y=float(input(“Enter second number : “))
z=float(input(“Enter third number : “))
max=x
if y>max:
max=y
if z>max:
max=z
print(“Largest number is”,max)
Iteration/looping statements
Counting loops the loops that repeat a certain number of times; Python’s for

loop is a counting loop.

Conditional loops the loops that repeat until a certain thing happens i.e., they

keep repeating as long as some condition is true; Python’s while loop is

conditional loop.
Program to print a table
num=5

for a in range(1,11):

print(num,’x’,a,’=‘,num*a)
Traversing a string
name=“superb”

for ch in name:

print(ch,’-’,end=‘ ‘)

Output

s-u-p-e-r-b-
Thank
you

You might also like