What is the datatype of the length, width, area and perimeter above?
Hint: Use Python's type(var_1) to find out.
Divide any of the variables above by any number (except 0 !), assign it to variable. What is the datatype of the resulting variable?
What did you find out?
'''What is the datatype of the length, width, area and perimeter above?
Hint: Use Python's type(var_1) to find out.
Divide any of the variables above by any number (except 0 !), assign it to variable. What is the datatype of the resulting variable?
What did you find out?'''
#assigned variables
var_1 = length = 31
var_2 = width = 2.31
var_3 = area = 1.2j
#types of data defined
print(type(var_1))
print(type(var_2))
print(type(var_3))
Comments
Leave a comment