nerdexam
Python_Institute

PCAP-31-03 · Question #155

What is the expected behavior of the following code? It will:

The correct answer is B. print 1 2. See the full explanation below for the reasoning.

Question

What is the expected behavior of the following code? It will:

Exhibit

PCAP-31-03 question #155 exhibit

Options

  • Aprint 2 1
  • Bprint 1 2
  • Ccause a runtime exception
  • Dprint <generator object f at (some hex digits)>

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    78% (25)
  • C
    13% (4)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice