You are on page 1of 22

PYTHON


MADE BY – UJJVAL SIWACH
CLASS – IX-C
What is python ?

 Python is a high-level ,interpreted
programming language .
 It is object oriented.
 It is a dynamic and multipurpose
language.
 It’s source can be compiled or run just-
in-time.
Where python is used?

 Web programming
 Desktop application
 Games
 Testing (automation)
 Enterprise
Who uses python?

 Google
 Facebook
 Yahoo
 NASA
 Mozilla
Features of python

Easy to use
 Free and open source
 Large standard library
 Expressive language
 Integrated
How to work in python?

To work in python there are two modes in
python .Let us talk about these modes……….
Modes in python

Interactive Mode Script Mode
 In interactive mode ,  In script mode , python
instructions are given instructions are stored
in front of python in a file generally and
prompt (>>>) in python are executed together in
shell . Python carries one go as a unit. The
out the given command saved instructions are
and shows the result known as python script
there itself. or python program.
Data types

Data can be of many types :-
 Numbers (integer ,floats ,complex no.)
 String
 Lists
 Tuples
 Dictionary
Numbers

Number data types can be used to store
numeric values. The number data types have
following core data types :
Integers
Float numbers
Complex Numbers ( it is an advanced
concept , hence you will read in next classes.)
Integers

Number without fractions represent the integer data.
It’s types :-
Plain integer (normal integer representation with
range about 2 million, uses 32 bits to store a value)
Long integer (store numbers larger than the range
of plain integers)
Booleans (represent the truth values TRUE and
FALSE)
Floating-Point Numbers

 A number having a fractional part is a
floating –point numbers.
For example :-
3.15482 , 568.49843 , 6954.1452 etc.
String

Anything enclosed in quotes represents the string data
types.
Python allow two string types :-
 Single line Strings (strings that are terminated
in single line.)
 Multiline Strings (string storing multiple lines of
text.)
Arithmetic Operators

.
Types of arithmetic operators

 Addition ( + )
 Subtraction ( - )
 Multiplication ( * )
 Division ( / )
 Modulus or Remainder ( % )
 Floor Division ( // )
 Exponentiation ( ** )
Addition

 Add values of its two operands.
For example :-
6+5
Result : 11
Subtraction

 Subtract the values of right operand
from left operand .
For example :-
6–5
Result : 1
Multiplication

 Multiplies the values of its two
operands.
For example :-
6*5
Result : 30
Division

 Divides the values of left operand with
the value of right operand .
For example :-
60/5
Result : 12
Modulus

 Divides the two operands and gives
the remainder resulting.
For example :-
6%5
Result : 1
Floor Division

Divides and truncates the fractional
part from the result.
For example :-
7.2 // 2
Result : 3.0
Exponentiation

 Returns base raised to power
exponent.
For example :-
2.5 ** 3
Result : 15.625
THE END

.

You might also like