Python Programming MCQs — Programming

3 practice MCQs

The correct answer is marked on every question, with its full explanation.

ProgrammingPython Programming PPSC FPSC NTSID: NWF-037

What is the output of this Python code? print(2 ** 3)

  1. A8 ✓ Correct answer
  2. B6
  3. C9
  4. D5
ProgrammingPython Programming PPSC FPSC NTSID: PROG-005

What is the output of this Python code? print(len("hello"))

  1. A4
  2. Bhello
  3. C6
  4. D5 ✓ Correct answer
ProgrammingPython Programming PPSC FPSC NTSID: PROG-010

What is the output of this Python code? print(10 // 3)

  1. A3.33
  2. B3 ✓ Correct answer
  3. C1
  4. D0

Practise these MCQs interactively →

← Programming MCQs