Quiz Catalog

Catalog of quizzes

a = (9)

print(type(a))
<class 'int'>
  • int
  • type
  • build-in/type

num_list: list = [1, 3, 6, 10]
multiplied_list = (num**2 for num in num_list)

print(type(multiplied_list))
<class 'generator'>
  • generator
  • build-in/list
  • build-in/type

a = "Tree",

print(type(a))
<class 'tuple'>
  • tuple
  • type
  • build-in/type

a = "Hello"

print(type(type(a)))
<class 'type'>
  • type
  • build-in/type

def increment(n):
  yield n + 1
  
print(type(increment(5)))
<class 'generator'>
  • generator
  • build-in/yield
  • build-in/type

a = (el for el in range(105))

print(type(a))
<class 'generator'>
  • generator
  • type
  • build-in/type

scores: dict = {'John': 99, 'Danny': 95}
iter_scores = iter(scores)

print(type(iter_scores))
<class 'dict_keyiterator'>
  • iterator
  • build-in/type
  • build-in/dict

a = {}

print(type(a))
<class 'dict'>
  • dict
  • type
  • build-in/type

def func(n):
  return lambda a : a * n

doubler = func(2)

print(type(doubler))
<class 'function'>
  • function/lambda
  • build-in/type

a = 101 ** 100
b = 95. ** 100

print(type(a) == type(b))
False
  • int/operation/pow
  • float/operation/pow
  • build-in/type

a = 5 ** 1000000
b = 5. ** 1000000

print(type(a) == type(b))
OverflowError: (34, 'Result too large')  
  • float/comprehension
  • build-in/type

a: type = type(type)
b = type(int)
print(a is b)
True
  • type/annotation
  • build-in/type

x = 3+5j

print(type(x))
<class 'complex'>
  • complex
  • type
  • build-in/type

text = b"Hello, World!!!"

print(type(text))
<class 'bytes'>
  • bytes
  • type
  • build-in/type