Quiz Catalog

Catalog of quizzes

def calc_sum(*args, **kwargs):
  return sum(args, kwargs)

print(calc_sum(1, 2, a = 3, b = 4))
TypeError: unsupported operand type(s) for +: 'dict' and 'int'
  • function/parameter/unpacking

def quatro(*x):
  x.append(x)
  return x

print(quatro(1, 2, 3))
AttributeError: 'tuple' object has no attribute 'append'
  • function/parameter/unpacking