[Q24-Q44] Use Real PCAP-31-03 - 100% Cover Real Exam Questions [Oct-2021]

Share

Use Real PCAP-31-03 - 100% Cover Real Exam Questions [Oct-2021] 

Dumps Brief Outline Of The PCAP-31-03 Exam - Exam4Docs

NEW QUESTION 24
What is the expected behavior of the following code?

  • A. it raises an exception
  • B. it outputs 0
  • C. it outputs 'None'
  • D. it outputs 3

Answer: D

 

NEW QUESTION 25
A class constructor (Select two answers)

  • A. cannot be invoked directly from inside the class
  • B. can be invoked directly from any of the superclasses
  • C. can return a value
  • D. can be invoked directly from any of the subclasses

Answer: A,D

 

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

  • A. the__name__variable content determines the way in which the module was run
  • B. a package can be stored as a tree of sub-directories/sub-folders
  • C. __pycache__is the name of a built-in variable
  • D. hashbang is the name of a built-in Python function

Answer: D

 

NEW QUESTION 27
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()

  • A. v1 == v2
  • B. random.choice{[1,2,3]) > 0
  • C. len(random. sample([1,2,3],1)) > 2
  • D. v1 < 1

Answer: B,D

 

NEW QUESTION 28
What is the expected output of the following code?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

Answer: B

Explanation:

 

NEW QUESTION 29
What is the expected output of the following snippet?

  • A. 0
  • B. ABC
  • C. abc
  • D. The code will cause a runtime exception

Answer: D

Explanation:

 

NEW QUESTION 30
What is the expected output of the following code?

  • A. 0
  • B. 1
  • C. an exception is raised
  • D. 2

Answer: C

 

NEW QUESTION 31
A method for passing the arguments used by the following snippet is called:

  • A. positional
  • B. keyword
  • C. named
  • D. sequential

Answer: A

 

NEW QUESTION 32
Which of the following lambda function definitions are correct? (Select two answers)

  • A. lambda X : None
  • B. lambda : 3,1415
  • C. lambda x : def fun(x): return x
  • D. lambda lambda: lambda * lambda

Answer: A,B

 

NEW QUESTION 33
What is the expected output of the following code?

  • A. an exception is raised
  • B. 0
  • C. 1
  • D. 2

Answer: B

 

NEW QUESTION 34
Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 21 ? (Select two answers)

  • A. self.queue.append(self.get last() +1)
  • B. self.queue.append(get_Iast() + 1)
  • C. queue.append(self.get last () + 1)
  • D. self.queue.append(self.queue[+1]

Answer: A

 

NEW QUESTION 35
What is the expected behavior of the following code?

  • A. it outputs True
  • B. it outputs nothing
  • C. it raises an exception
  • D. it outputs False

Answer: A

 

NEW QUESTION 36
What is the expected behavior of the following code?

  • A. it outputs error
  • B. the code is erroneous and it will not execute
  • C. it outputs <class ' IndexError' >
  • D. it outputs list assignment index out of range

Answer: D

 

NEW QUESTION 37
What is the expected behavior of the following code?

  • A. it raises an exception
  • B. it outputs 6
  • C. it outputs 1
  • D. it outputs 3

Answer: B

 

NEW QUESTION 38
What is the expected output of the following snippet?

  • A. 0
  • B. 1
  • C. the code is erroneous
  • D. 2

Answer: C

 

NEW QUESTION 39
A compiler is a program designed to (select two answers)

  • A. rearrange the source code to make it clearer
  • B. check the source code in order to see if its correct
  • C. execute the source code
  • D. translate the source code into machine code

Answer: B,D

Explanation:
https://www.thoughtco.com/what-is-a-compiler-958322

 

NEW QUESTION 40
What is the expected output of the following code?

  • A. True
  • B. None
  • C. False
  • D. 0

Answer: A

 

NEW QUESTION 41
Which of the following expression evaluate to True? (Select two answers)

  • A. 't' . upper ( ) in 'Thames'
  • B. 'in' in 'in'
  • C. 'in not' in 'not'
  • D. 'in' in 'Thames'

Answer: A,B

 

NEW QUESTION 42
What is the expected behavior of the following code?

  • A. it outputs [0, 1, 2, 3, 4]
  • B. it outputs [2, 4]
  • C. the code is erroneus and it will not execute
  • D. it outputs [4, 2]

Answer: D

 

NEW QUESTION 43
Which of the following invocations are valid? (Select two answers)

  • A. rfind("python","r")
  • B. "python".index("th")
  • C. sorted("python")
  • D. "python".sort ()

Answer: B,C

 

NEW QUESTION 44
......

Certification Training for PCAP-31-03 Exam Dumps Test Engine: https://www.exam4docs.com/PCAP-31-03-study-questions.html

PCAP-31-03 Training & Certification Get Latest Python Institute PCAP : https://drive.google.com/open?id=1Twxi5grXsRGTLHWrm93VCNn2aJJ8LQSt