Data Analytics Internship Assignment
Data Analytics Internship Assignment
ipynb - Colab
print('Unified Mentor')
Unified Mentor
Rohit
name = 'Rohit'
age = 25
height = 5.9
type(name)
str
type(age)
int
type(height)
float
student1
type(student1)
list
student2
type(student2)
tuple
student3
https://colab.research.google.com/drive/1libjRp7M5JQuTUjVrU7j8YSE10Tb0HMS#scrollTo=1sbEX8vQRosU&printMode=true 1/4
6/9/24, 4:51 PM UM_06_June.ipynb - Colab
type(student3)
set
student4 = {'Name':'Vishal', 'Age':25, 'Height':5.8} #Dictionary method. Use key:value pair to store data
student4
student4['Name']
'Vishal'
student4.keys()
student4.values()
type(student4)
dict
print(range(10))
range(0, 10)
bool(1)
True
bool(0)
False
# Arithmetic Operators( +,-,*,/,%,**) # Used with nemuric values to perform common mathematical operat
x= 10
y= 3
print(x+y)
13
print(x-y)
print(x*y)
30
https://colab.research.google.com/drive/1libjRp7M5JQuTUjVrU7j8YSE10Tb0HMS#scrollTo=1sbEX8vQRosU&printMode=true 2/4
6/9/24, 4:51 PM UM_06_June.ipynb - Colab
print(x/y)
3.3333333333333335
print(x%y)
print(x**y)
1000
x, y = 10, 3
x += y
print(x)
13
# Comparison Operators (==, !=, <, >, <=, >=) # Used to compare two values
x = 10
y = 3
print(x == y)
print(x != y)
print(x < y)
print(x > y)
print(x <= y)
print(x >= y)
False
True
False
True
False
True
x = 10
y = 3
True
True
False
x = ['apple', 'banana']
y = 'apple'
print(y in x)
print(y not in x)
True
False
https://colab.research.google.com/drive/1libjRp7M5JQuTUjVrU7j8YSE10Tb0HMS#scrollTo=1sbEX8vQRosU&printMode=true 3/4
6/9/24, 4:51 PM UM_06_June.ipynb - Colab
# finding substring
name = 'Management'
a = 'age'
a in name
True
https://colab.research.google.com/drive/1libjRp7M5JQuTUjVrU7j8YSE10Tb0HMS#scrollTo=1sbEX8vQRosU&printMode=true 4/4