[Jan 28, 2022] PCAP-31-03 Exam Dumps PDF Updated Dump from ActualPDF Guaranteed Success [Q72-Q92]

Share

[Jan 28, 2022] PCAP-31-03 Exam Dumps PDF Updated Dump from  ActualPDF Guaranteed Success

Pass Your Python Institute Exam with PCAP-31-03 Exam Dumps


What is the duration, language, and format of PCAP - Certified Associate in Python Programming (PCAP-31-03) Exam

  • Language of Exam: English
  • Duration of Exam: 65 minutes + 10 minutes (Non-Disclosure Agreement/Tutorial)
  • Passing score: 70%
  • Type of Questions: Single-choice and multiple-choice questions
  • Number of Questions: 40

 

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

  • A. it outputs 2
  • B. it outputs 3
  • C. it outputs 1
  • D. the code is erroneous and it will not execute

Answer: B

 

NEW QUESTION 73
A class constructor (Select two answers)

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

Answer: A,C

 

NEW QUESTION 74
Python strings can be "glued" together using the operator:

  • A. _
  • B. +
  • C. &
  • D. .

Answer: B

 

NEW QUESTION 75
What is true about the following snippet? (Select two answers)

  • A. the string what a pity will be seen
  • B. the string it's nice to see you will be seen
  • C. the code will raise an unhandled exception
  • D. the siring I feel fine 'will be seen

Answer: A,D

 

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

It will

  • A. cause a runtime exception
  • B. print <generator object f at (some hex digits)>
  • C. print 2 1
  • D. print 1 2

Answer: D

 

NEW QUESTION 77
What is the expected output of the following code if the file named existing_text_file is a non-zero length text file located inside the working directory?

  • A. the length of the first line from the file
  • B. the length of the last line from the file
  • C. 0
  • D. the number of lines contained inside the file

Answer: C

 

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

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

Answer: C,D

 

NEW QUESTION 79
Which of the following words can be used as a variable name? (Select two valid names)

  • A. For
  • B. True
  • C. true
  • D. for

Answer: A,C

 

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

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

Answer: A

 

NEW QUESTION 81
What can you deduce from the following statement0 (Select two answers) str = open('file.txt', "rt")

  • A. str is a string read in from the file named file. txt
  • B. the opened file cannot be written with the use of the str variable
  • C. a newlina character translation will be performed during the reads
  • D. if file. txt does not exist, it will be created

Answer: B,C

 

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

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

Answer: C

Explanation:

 

NEW QUESTION 83
What is the expected behavior of the following code?
x - 3 % 1
y -1 if x > else 0
print (y)

  • A. it outputs 0
  • B. it outputs 1
  • C. it outputs -1
  • D. the code is erroneous and it will not execute

Answer: A

 

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

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

Answer: C

 

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

  • A. it outputs 2
  • B. it outputs 3
  • C. it outputs 1
  • D. the code is erroneous and it will not execute

Answer: B

 

NEW QUESTION 86
What can you deduce from the following statement? (Select two answers)
str = open('file.txt', "rt")

  • A. str is a string read in from the file named file.txt
  • B. the opened file cannot be written with the use of the str variable
  • C. a newlina character translation will be performed during the reads
  • D. if file. txt does not exist, it will be created

Answer: A,B

 

NEW QUESTION 87
What is the output of the following piece of code?

  • A. ant'bat'camel
  • B. ant"bat"camel
  • C. antbatcamel
  • D. ant bat camel

Answer: B

Explanation:

 

NEW QUESTION 88
Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True? (Select two answers)

  • A. str(Object) == 'Object'
  • B. len(ClassB.__bases__) == 1
  • C. ClassA. _module_ == 'ClassA'
  • D. _name == _main_'

Answer: B,D

 

NEW QUESTION 89
What is true about Object-Oriented Programming in Python? (Select two answers)

  • A. the same class can be used many times to build a number of objects
  • B. if a real-life object can be described with a set of adjectives, they may reflect a Python object method
  • C. a subclass is usually more specialized than its superclass
  • D. each object of the same class can have a different set of methods

Answer: A,B

 

NEW QUESTION 90
Assuming that the following inheritance set is in force, which of the following classes are declared properly?
(Select two answers)

  • A. class Class_1(C,D): pass
  • B. class Class_3(A,C): pass
  • C. class Class_4 (D, A) : pass
  • D. class Class_2(B,D): pass

Answer: B,C

 

NEW QUESTION 91
Which one of the platform module functions should be used to determine the underlying platform name?

  • A. platform.processor()
  • B. platform.python_version()
  • C. platform.platform ()
  • D. platform.uname ()

Answer: C

 

NEW QUESTION 92
......

New Real PCAP-31-03 Exam Dumps Questions: https://dumpstorrent.actualpdf.com/PCAP-31-03-real-questions.html