nerdexam
Python_Institute

PCAP-31-03 · Question #117

What is the expected behavior of the following code?

The correct answer is A. it outputs -2. See the full explanation below for the reasoning.

Question

What is the expected behavior of the following code?

Options

  • Ait outputs -2
  • Bit outputs 2.0
  • Cit outputs 0.0
  • Dthe code is erroneous and it will not execute

How the community answered

(40 responses)
  • A
    70% (28)
  • B
    5% (2)
  • C
    8% (3)
  • D
    18% (7)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice