Latest [Aug 11, 2021] PCAP-31-03 Exam with Accurate Certified Associate in Python Programming PDF Questions
Take a Leap Forward in Your Career by Earning Python Institute 110 Questions
NEW QUESTION 11
Which of the following statements are true? (Select two answers)
- A. ASCII is synonymous with UTF-8
- B. II in ASCII stands for Information Interchange
- C. \e is an escape sequence used to mark the end of lines
- D. a code point is a number assigned to a given character
Answer: A,B
NEW QUESTION 12
What is the expected output of the following code if there is no file named non existing_file inside the working directory?
- A. 2 2 3
- B. 1 3
- C. 1 2 3
- D. 2 2
Answer: A
NEW QUESTION 13
Can a module run Eke regular code?
- A. it depends on the Python version
- B. no. it is not possible; a module can be imported, not run
- C. yes, but it cannot differentiate its behavior between the regular launch and import
- D. yes, and it can differentiate its behavior between the regular launch and import
Answer: D
NEW QUESTION 14
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
- A. B.VarA == 3
- B. hasattr(obj_b, 'prop_aa')
- C. obj_b.prop_a == 3
- D. isinstance(obj_c,A)
Answer: B,D
NEW QUESTION 15
What is a true about python class constructors? (Select two answers)
- A. the constructor must return a value other than None
- B. there can the more than one constructor in a Python class.
- C. the constructor must have at least one parameter
- D. the constructor is a method named_init_
Answer: C,D
NEW QUESTION 16
Assuming that the V variable holds an integer value to 2, which of the following operators should be used instead of OPER to make the expression equal to 1?
V OPER 1 -
- A. >>
- B. <<<
- C. <<
- D. >>>
Answer: A
NEW QUESTION 17
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'python' [::2] string = string[-1] + string[-2]
- A. string[0] == string[-1]
- B. len (string] == 3
- C. string[0] == 'o'
- D. string is None
Answer: C
NEW QUESTION 18
What is the expected behavior of the following code?
- A. the code is erroneous and it will not execute
- B. it outputs 1
- C. it outputs 2
- D. it outputs 3
Answer: C
NEW QUESTION 19
How many elements will the list1 list contain after execution of the following snippet?
- A. two
- B. three
- C. zero
- D. one
Answer: A
NEW QUESTION 20
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 21
With regards to the directory structure below, select the proper forms of the directives in order to import module_ a. (Select two answers)
- A. import module_a from pypack
- B. import module_a
- C. import pypack.module_a
- D. from pypack import module_a
Answer: C,D
NEW QUESTION 22
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 23
What can you deduce from the following statement0 (Select two answers) str = open('file.txt', "rt")
- A. if file. txt does not exist, it will be created
- B. str is a string read in from the file named file. txt
- C. a newlina character translation will be performed during the reads
- D. the opened file cannot be written with the use of the str variable
Answer: C,D
NEW QUESTION 24
What is the expected behavior of the following code?
- A. it outputs 0
- B. it raises an exception
- C. it outputs 1
- D. it outputs 2
Answer: B
NEW QUESTION 25
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 26
What is the expected output of the following code if existing_file is the name of a file located inside the working directory?
- A. 1 2
- B. 0
- C. 2 3
- D. 1 2 3
Answer: B
NEW QUESTION 27
A property that stores information about a given class's super-classes is named:
- A. _bases_
- B. _upper_
- C. _ancestors_
- D. _super_
Answer: A
NEW QUESTION 28
What is true about the following snippet? (Select two answers)
- A. the siring I feel fine 'will be seen
- B. the string what a pity will be seen
- C. the code will raise an unhandled exception
- D. the string it's nice to see you will be seen
Answer: A,B
NEW QUESTION 29
What is the expected output of the following code?
- A. 0
- B. 1
- C. an exception is raised
- D. 2
Answer: C
NEW QUESTION 30
......
Authentic Best resources for PCAP-31-03 Online Practice Exam: https://www.testsdumps.com/PCAP-31-03_real-exam-dumps.html
Practice To PCAP-31-03 - TestsDumps Remarkable Practice On your Certified Associate in Python Programming Exam: https://drive.google.com/open?id=1aK6qWAYo3vA6aqaBDC538u0N-v_ltoS_
