Professional Documents
Culture Documents
[2.7.11] python.
SETTING UP PATH:
STEP 1: Now moving to the resource folder of python
file.
(hello
hello
then click
LECTURE 1 (VARIABLES)
2016 20:20pm
13 SEPTEMBER
# Print
>>>>
anything.
45
decimal, alphabets.
45
EX: A no. ,
Mohit 45
EX:
#) to use variable
Variable is a name given to value
EX: >>>> name = Mohit
>>>> Height =6.3
>>>> Age = 32
>>>> type ( name)
< type str>
#) NOTE: Everything given in single quote is string
either float or innt value.
EX: >>>> type (32)
< type str
# NAVIGATE THIS PROGRAM
PS D: /users/admin>cd D: /python27/python programs
PS
D:
/python27/python
stringquotes.py
programs>python
# ORDER OF OPERATION
P PARENTHESES
E EXPONENTIATION
M MULTIPLICATION
D DIVISION
A ADDITION
S SUBSTRACTION
EX: >>>> 5*(6+3)/9-3 2
#) HOW TO MAKE INPUT FROM USER
By using raw_input
EX: what is your name boy?
>Mohit
>>>> Print name
Mohit
#) /n symbol is used to add new line.
PS
D:
inputs.py
/python27/python
programs>python
Try:
Except:
Print please enter numbers
13
a)
True
B
>>>> 1>2
False
#) COMPARISON OPERATORS
X==y
X!=y
X<y
x>y
x<=y
x>=y
x is y
x is not y
# Logical operator
and both side should be true