Quiz Catalog

Catalog of quizzes

a = 1 - .1

print(int(a))
0
  • int
  • build-in/int

print(9**19 - int(float(9**19)) > 0)
True
  • build-in/int
  • build-in/float
  • int/operator/exponentiation

lst = [4.6, 2.3, 7.8]
a = list([2, 5.9])

for num in lst:
  a.append(int(num))

print(a)
[2, 5.9, 4, 2, 7]
  • build-in/int
  • build-in/list
  • list/operation/append

lst = [(2, 3), (2, 9), (5, 0)]

a = dict(lst)

print(a)
{2: 9, 5: 0}
  • build-in/dict
  • build-in/int
  • list/literal
  • tuple/literal