# integerage = 25type(age)#ans: <class 'int'>count = -10#ans: negative integerbig_num = 1000000#ans: large integer
# floatprice = 19.99type(price)#ans: <class 'float'>pi = 3.14159#ans: float valuenegative = -5.5#ans: negative float
# stringmessage = "Hello"type(message)#ans: <class 'str'>name = 'Alice'#ans: single quotestext = """multiline"""#ans: multiline string
# booleanis_valid = Truetype(is_valid)#ans: <class 'bool'>is_empty = False#ans: False value
# None typex = Nonetype(x)#ans: <class 'NoneType'>#ans: represents absence of valueresult = None#ans: no value yet
# type() functionx = 5type(x)#ans: <class 'int'>y = "hello"type(y)#ans: <class 'str'>z = 3.14type(z)#ans: <class 'float'>
# what type is this?x = 5.0#ans: <class 'float'># what type is this?y = "123"#ans: <class 'str'># what type results?result = 10 / 2#ans: <class 'float'># what type is this?z = True + False#ans: <class 'int'> (True=1, False=0)
# what type?a = 5b = 2c = a / b#ans: <class 'float'># what type?x = 10y = 3z = x // y#ans: <class 'int'>
# tricky: what type?value = "5" + "3"#ans: <class 'str'> (result is "53")# what is the type?x = None#ans: <class 'NoneType'># what type is this expression?result = 5 > 3#ans: <class 'bool'>
# what happens?x = int(True)#ans: 1, type is <class 'int'># mixing types?x = 5 + 2.5#ans: 7.5, type is <class 'float'># edge case?x = bool([])#ans: False, type is <class 'bool'>
# what type?x = 0#ans: <class 'int'># empty string type?s = ""#ans: <class 'str'># what type?x = float(5)#ans: 5.0, <class 'float'>
Google tag (gtag.js)