-- int: 3 , 5, 7
-- Float: 2.5 , 0.5 , 4.6
-- Complex Numbers: 2+1j
"brand": "Audi",
"model": "Q5",
"year": 2020
}
A = 4
B = 3.5
C = 3+2j
D = "hello"
my_list = [1, 2, 3, 4, 5]
my_tuple = ("dogs", "cats", "birds")
my_dict = {
"brand": "Audi",
"model": "Q5",
"year": 2020
}
# checking type of A , B , C , D , my_list, my_tuple, my_dict
print(type(A))
print(type(B))
print(type(C))
print(type(D))
print(type(my_list))
print(type(my_tuple))
print(type(my_dict))
# What is the type of True/False?
print(type(True))
print(type(False))
# What is the interger True/False?
print(int(True))
print(int(False))
# What is the boolean of 0/1?
print(bool(0))
print(bool(1))
K = 70
print(K, type(K))
# Convert type K from int to float
print(float(K))
K = 3.56
print(K, type(K))
# Convert type K from float to int
z = int(K)
print(z , type(z))
M = 3.56
N = 12
print(M, type(M))
print(N, type(N))
# Convert type K from float/int to string
Z1 = str(M)
Z2 = str(N)
print(Z1, type(Z1))
print(Z2, type(Z2))