conversion.md

April 17, 2022 ยท View on GitHub

Conversion

What is the result of each of the following statements?

  1. int(False)
  2. int(True)
  3. bool(0)
  4. bool(1)
  5. True + 2
  6. float(True)

Solution

  1. 0
  2. 1
  3. False
  4. True
  5. 3
  6. 1.0