/ Python And R Data science skills: 05 Data Science training Python videos Vlrtraining Telugu

Sunday 4 February 2018

05 Data Science training Python videos Vlrtraining Telugu

https://vlrtraining.com/courses/python-data-science-beginner-tutorial 05 boolen opertors
In [3]:
#boolena opre
#hggsgkjjk
In [4]:
a=10
b=20

c=a+b

In [6]:
c
Out[6]:
30
In [7]:
a
b
Out[7]:
20
In [8]:
print(a)
print(b)
10
20

999

In [17]:
a=155
b=80
c=a/b
In [18]:
print (c)
1.9375
In [11]:
type(c)
Out[11]:
float
In [23]:
c=8.7
round(c)
Out[23]:
9
In [25]:
a=4
b=0
c=a/b
c
---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)
<ipython-input-25-a2463dd3efbd> in <module>()
      1 a=4
      2 b=0
----> 3 c=a/b
      4 c

ZeroDivisionError: division by zero

In [26]:
sqrt(9)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-26-c836dfef5db4> in <module>()
----> 1 sqrt(9)

NameError: name 'sqrt' is not defined
In [31]:
num1=100
In [28]:
sqrt(num1)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-28-9dc2ed27a4b5> in <module>()
----> 1 sqrt(num1)

NameError: name 'sqrt' is not defined
In [29]:
import math
In [32]:
math.sqrt(num1)
Out[32]:
10.0
In [33]:
round(math.sqrt(num1))
Out[33]:
10

No comments:

Post a Comment