nerdexam
Python_Institute

PCAP-31-03 · Question #134

What is the expected behavior of the following code?

The correct answer is D. it outputs 5. See the full explanation below for the reasoning.

Question

What is the expected behavior of the following code?

Exhibit

PCAP-31-03 question #134 exhibit

Options

  • Ait outputs 2
  • Bit raises an exception
  • Cit outputs 3
  • Dit outputs 5

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    8% (3)
  • C
    14% (5)
  • D
    75% (27)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice