Class 4
Class 4
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
y = eval(input('second number'))
print(x+y)
But in python3 we have only input() method and eaw_input() method is not available.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
10--->int
'scodeen'--->str
10.5--->float
Note:- But in python3 we have only input() method and eaw_input() method is not
available.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
Output:-
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
1.Arithmetic Operators
2.Relational or comparision operatos
3.Logical Operatos
Note:- But in python3 we have only input() method and eaw_input() method is not
available.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
>>> s = {101:'Tushar',102:'Balaji',103:'Rupali'}
>>> s.clear()
>>> s
{}
10--->int
'scodeen'--->str
10.5--->float
ex:-
l = [10,56.87,7+9j,True,'string',[1,2,3,4],10]
>>> l
[10, 56.87, (7+9j), True, 'string', [1, 2, 3, 4]]
>>>
current versionNote:- But in python3 we have only input() method and eaw_input()
method is not available.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
>>> s = {101:'Tushar',102:'Balaji',103:'Rupali'}
>>> s.clear()
>>> s
{}
1.Arithmetic Operators
2.Relational or comparision operatos
3.Logical Operatos
4.Bitwise Operators
5.Assignment Operatos
6.Special Operator.
Note:- But in python3 we have only input() method and eaw_input() method is not
available.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
Identifiers
a = 10
class BankingProject:
def system_config:
total123=(correct)
123total =(wrong)
3.Indentifiers are case sensitive . of course python lang. is case sesitive lang.
total = 10
TOTAL = 99
print(total)#10
print(TOTAL)#99
x = 10 (normal variable)
_x = 10(procted variable)
__x = 10 (private variable)
___x = 10 (magic variable)
In python some words are reserved to represent some meaning or functionality. such
type of words are called Reserved words. There are 35 words are reserved in python.
ex:-True = 10(worng)'
2.All Reserved words in python contain only alphabet symbols.
3.Excepts the True,False,None 3 reserved words ,all contains only lower case
alphabets symbols.
process of keywords
import keyword
keyword.kwlist