Python
Python
PL
If
Translator LLL Machine
Converts Machine
ALL code
HLLE LLL
source CMLL
code Machine
t level
code written language
human O's 41 s
by
Translator
Compiler Interpreter
will take the entire code will take one line at a time
D
and convert to Licata and convert the code to
time LLL
WorkflowofPgth nStreator
syntax compiler
checker Babe
v
exceptions
Machine Interpreter
My C
Python Engine
a syntax error
logical errors
of finding out
Debugging is the process the error
and rectifying it
Python Environment
two Python 2 version
Versions Python 3 version
Jupiter notebook
other tools that we can use are
visual studio
Spyder
Py charm
Atom
Spyder
Jupiter notebook will save the file as ipynb
ipyn b i python notebook
For our
program to work correctly we need to
ex Enlai
number of digits 34
is similar to camel
Pascal case pascal case
capital case
ex
Number Of Digits 34
used for class names in python
It I 2 2 X
exe I 1 It 1 25
It 1 It 3
z Z X U
I I 2 2 X
Ruley comments
It I
It I
It 2 3 4 I
On Python multi line comments are not supported
triple quote concept does not work
Ruleta Indentation
Indentation is used to specify a block of code
Default Indentation is four white spaces
ex if true
Print hi
we white
four spaces
we can also use one two or three white spaces
Rule 6 keywords
keywords are the reserved words which will
have a special meaning in Python Engine PE
Ralf Identifies
Identifier is a name given to an entity i.e a class
Ide tf g Ey c e
is an identifier
Rule Variable
simplified definition It is a container where we will
store data
variable is a subset of identifier
ext 1 pm
q Lunch
L Office
food data
Tiffin box container variable
To Identify Yan able Identifier we have to
name them
numbers A Z A Z or 0 9
ex Albo
a be x
a 23
a 23
923 X
If naming convention is not used we will get a
syntax error
ext a b c 10 20,30
parfumeric Datatype
different string Datatype
types Boolean Data type
Collection Datatype
ex 1.2224 i e 12200 0
Complex we have parts real and imaginary
at bi
ext 2 5
real imaginary
part part
ex 2 3
2 1
Zac
when we want to execute this piece of pre
existing code we call this function
Functions
two Inbuilt function
types
user defined Junction
ex N 100
typeck
int integer
4 1 2
type Cy
complex
Type conversion It is a process by using which we
ex It 2.2 3.2
float constructor
complex constructor
constructor will be taught later
string
inte
ex 2 10 4 10 z
intend intcy
o 10 we can loose data
floater
Y float y
20 53
Complex C
ex 2 100 9 100 53
complex x Complex y
100 0
10040g
we cats loose data
complex to integer
Variable
Actual definition It is a name given to a
memory location
2 10
memory location
Inbuilt function
id C this function gives the id of the memory
location
ex 2 10
iden
an al 0234
for ene 2 10
y 10
Fat
each Cell will have id
RAM
id Rna 10234