Embercode
✕
Variables and Data TypesQuick quiz

Literals and bases

6 questions. Covers Literals and number bases in Python.

Questions 1 to 5 of 6

  1. 1. What does this program print? ``python x = 0x1F y = 0o10 print(x + y) ``
  2. 2. What does format(255, 'x') return?
  3. 3. Which line runs without a SyntaxError?
  4. 4. What does this program print? ``python import ctypes b = 0xFFFFFFFF c = ctypes.c_int32(0xFFFFFFFF).value print(b, c) ``
  5. 5. Write the hexadecimal literal for 255, with its prefix.

    Type your answer.

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.