nerdexam
Python_Institute

PCAP-31-03 · Question #162

Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers)

The correct answer is B. v1 < 1 C. random.choice([1,2,3]) > 0. See the full explanation below for the reasoning.

Question

Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers)

Exhibit

PCAP-31-03 question #162 exhibit

Options

  • Av1 == v2
  • Bv1 < 1
  • Crandom.choice([1,2,3]) > 0
  • Dlen(random.sample([1,2,3],1)) > 2

How the community answered

(21 responses)
  • A
    10% (2)
  • B
    71% (15)
  • D
    19% (4)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice