PCAP-31-03 Certified Associate in Python Programming

Loading demo links...

Showing 1–3 of 10 questions

Question 1

Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers)

Expected output:

1 2 3

Code:

Select all that apply, then click Submit answer.

  • c, b, a = b, a, c

  • c, b, a = a, c, b

  • a, b, c = c, a, b

  • a, b, c = a, b, c

Question 2

Which of the following expressions evaluate to True? (Select two answers)

Select all that apply, then click Submit answer.

  • 11 == '011'

  • 3 * 'a' < 'a' * 2

  • 'abc' .upper () < 'abc'

  • '1' + '2' * 2 !=2 '12'

Question 3

A Python module named pymod.py contains a variable named pyvar.

Which of the following snippets will let you access the variable? (Select two answers)

Select all that apply, then click Submit answer.

  • import pyvar from pymod pyvar = 1

  • from pymod import pyvar = 1

  • from pymod import pyvar pyvar ()

  • import pymod pymod.pyvar = 1