/ Python And R Data science skills: 06 ds python operators and boolean in telugu vlr training

Sunday 4 February 2018

06 ds python operators and boolean in telugu vlr training

https://vlrtraining.com/courses/python-data-science-beginner-tutorial 06 boolean values and operators
In [1]:
8<9
Out[1]:
True
In [2]:
type(8<9)
Out[2]:
bool
In [3]:
8>9
Out[3]:
False
In [4]:
a=TRUE
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-4-abdf58a3cacd> in <module>()
----> 1 a=TRUE

NameError: name 'TRUE' is not defined
In [5]:
a=True
In [6]:
a
Out[6]:
True
In [11]:
#==
# !=
# <>
# < ,> ,<= ,>= ,and, or ,not, 
  File "<ipython-input-11-a0c585da94b6>", line 4
    10 <> 11
        ^
SyntaxError: invalid syntax
In [12]:
9<=10
Out[12]:
True
In [38]:
a=16 
b=13
c=12
d=a<b
e=c>b
f=a>c
In [39]:
print("the value of D is" , d ,"the value of e is" , e )
the value of D is False the value of e is False
In [41]:
d and e and f
Out[41]:
False
In [42]:
d
Out[42]:
False
In [43]:
not(d)
Out[43]:
True

No comments:

Post a Comment