In [6]:
print("Welcome to Python Onboarding Course") # Simple command
Welcome to Python Onboarding Course
In [4]:
print("Welcome")
Welcome
In [5]:
Welcome to Python Onboarding Course
  File "<ipython-input-5-ccc004c07433>", line 1
    Welcome to Python Onboarding Course
             ^
SyntaxError: invalid syntax

Getting started with Jupyter Notebook

Getting started with Jupyter Notebook

Getting started with Jupyter Notebook

Comments and running text

In [7]:
4+3
Out[7]:
7
In [2]:
var = 4+3
var
Out[2]:
7
In [4]:
type(var)
Out[4]:
int
In [16]:
var
Out[16]:
[2, 3, 4, 5]
In [5]:
var = [2,3,4,5]# List
var
Out[5]:
[2, 3, 4, 5]
In [7]:
type(var)
Out[7]:
list
In [8]:
var = [4,"Customers", "Vendors", "Employees", '5']
type(var)
Out[8]:
list
In [19]:
var[1]
Out[19]:
'Customers'
In [20]:
"The key stakeholders of any organizatioin are " + var[1] + ", " + var[2] + " & " + var[3] 
Out[20]:
'The key stakeholders of any organizatioin are Customers, Vendors & Employees'
In [21]:
x=[[1,2,3], [4,5,6]]
In [22]:
x
Out[22]:
[[1, 2, 3], [4, 5, 6]]
In [9]:
f=10.35
type(f)
Out[9]:
float
In [10]:
c=100+8j
type(c)
Out[10]:
complex
In [11]:
s = "Im a python data scientist"
type(s)
Out[11]:
str
In [12]:
l=[3,4,5]
type(l)
Out[12]:
list
In [13]:
t=(2,3,4,5)
type(t)
Out[13]:
tuple
In [14]:
t[0]
Out[14]:
2
In [15]:
t[0]=8
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-15-e136e09d0915> in <module>
----> 1 t[0]=8

TypeError: 'tuple' object does not support item assignment
In [17]:
l[0]
Out[17]:
3
In [18]:
l[0]=10
In [19]:
l
Out[19]:
[10, 4, 5]
In [20]:
D={"key":"value"}
In [21]:
D
Out[21]:
{'key': 'value'}
In [22]:
D={"First Name" : "Neil", "Second Name" : " Srinivasan", "Profession": "Instructor"}
In [23]:
D
Out[23]:
{'First Name': 'Neil',
 'Second Name': ' Srinivasan',
 'Profession': 'Instructor'}
In [28]:
D["First Name"]
Out[28]:
'Neil'
In [ ]:
 
In [ ]: