Free PCAP Python-Institute PCAP Practice Test Question

Loading demo links...

Showing 10–12 of 14 questions

Question 10 (Topic 1)

Assuming that the snippet below has been executed successfully, which of the following expressions evaluate to True? (Choose two.) string = 'python'[::2] string = string[-1] + string[-2]

Select an option, then click Submit answer.

  • string[0] == 'o'
  • string is None
  • len(string) == 3
  • string[0] == string [-1]
Question 11 (Topic 1)

Assuming that the code below has been executed successfully, which of the expressions evaluate to True? (Choose two.)

Select an option, then click Submit answer.

  • len(Class.__dict__) == 1
  • 'data' in Class.__dict__
  • 'var' in Class.__dict__
  • 'data' in Object.__dict__
Question 12 (Topic 1)

With regards to the directory structure below, select the proper forms of the directives in order to import module_b. (Choose two.)

Select an option, then click Submit answer.

  • from pyback.upper import module_b
  • import pyback.upper.module_b
  • import upper.module_b
  • import module_b