Free PCAP-31-03 Exam Braindumps (page: 1)

Page 1 of 37

What is true about Python packages? (Select two answers)

  1. the__name__variable content determines the way in which the module was run
  2. a package can be stored as a tree of sub-directories/sub-folders
  3. __pycache__is the name of a built-in variable
  4. hashbang is the name of a built-in Python function

Answer(s): B,C



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)

  1. import pyvar from pymod pyvar = 1
  2. from pymod import pyvar = 1
  3. from pymod import pyvar pyvar ()
  4. import pymod pymod.pyvar = 1

Answer(s): A,D



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

import random
v1 = random. random()
v2 = random. random()

  1. len(random.sample([1,2,3],2)) > 2
  2. v1 == v2
  3. random.choice([1,2,3]) >=1
  4. v1 >= 1

Answer(s): B,C



With regards to the directory structure below, select the proper forms of the directives in order to import module_
(Select two answers)

  1. import pypack.module_a
  2. import module_a from pypack
  3. import module_a
  4. from pypack import module_a

Answer(s): A,D



Page 1 of 37



Post your Comments and Discuss Python Institute PCAP-31-03 exam with other Community members:

Mohammed commented on November 15, 2024
After checking these questions and reviewing all the answers and Explanations I realized that I would not have been able to pass the exam based on my current knowledge. This is completely changed my approach in how I am going to prepare now.
UNITED STATES
upvote

Nigel commented on September 27, 2024
Managed to pass my exam bu using the full version of this exam. This free version has less questions compared to PDF.
Spain
upvote

Idris Abraham Idilli commented on September 23, 2024
Very interesting
Anonymous
upvote