Lecture Notes 2
Lecture Notes 2
LECTURE NO.2
Sr.
No Content Description Example
.
Comments are generally
used to explain the code.
Must use the comments
because in the future
anyone wants to modify the
Commenting code as well as implement
1)
the new module; then, it
can be done easily.
Write sentence after # to
make it comment.
# we are learning python
Deletion
2) To delete a variable, string
del ()
conversion of
3)
one data type
to another
data type
e) Conversion of
f)
i) If the string contains
integer character then only
it can be converted to int or
float
Math Operators
Multiplication and
* / Division
6)
// Floor division
To get value of division
Floor division
before decimal point
only
Modulo division
%
Modulo To get reminder of the
division division
To get round fig. value
up to required decimal
point
X**y
Power **
To measure Yth power
of X