[Aug 11, 2023] PCAP-31-03 Exam Brain Dumps - Study Notes and Theory
Pass Python Institute PCAP-31-03 Test Practice Test Questions Exam Dumps
The PCAP-31-03 certification exam is an online, proctored exam that is available in multiple languages. Candidates can take the exam from anywhere in the world using a computer with a reliable internet connection. PCAP-31-03 exam consists of 40 multiple-choice questions that must be completed within 75 minutes. To pass the exam, candidates must score at least 70%.
NEW QUESTION # 36
What will the value of the i variable be when the following loop finishes its execution?
- A. the variable becomes unavailable
- B. 0
- C. 1
- D. 2
Answer: B
NEW QUESTION # 37
Assuming that String is six or more letters long, the following slice
String[1:-2]
is shorter than the original string by:
- A. one char
- B. three chars
- C. two chars
- D. four chars
Answer: B
NEW QUESTION # 38
What is the expected behavior of the following code?
- A. it outputs 3
- B. the code is erroneous and it will not execute
- C. it outputs 2
- D. it outputs 1
Answer: B
NEW QUESTION # 39
What is the expected output of the following snippet?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: D
Explanation:
NEW QUESTION # 40
What is the expected behavior of the following code?
- A. it outputs 3
- B. it outputs 6
- C. it raises an exception
- D. it outputs 1
Answer: B
NEW QUESTION # 41
Which of the following invocations are valid? (Select two answers)
- A. rfind("python","r")
- B. "python".index("th")
- C. "python".sort ()
- D. sorted("python")
Answer: B,D
NEW QUESTION # 42
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. _name == _main_'
- B. str(Object) == 'Object'
- C. ClassA. _module_ == 'ClassA'
- D. len(ClassB.__bases__) == 1
Answer: D
NEW QUESTION # 43
Python's built-in function named open () tries to open a file and returns:
- A. a stream object
- B. an error code (0 means success)
- C. an integer value identifying an opened file
- D. always None
Answer: A
NEW QUESTION # 44
What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?
- A. an errno value corresponding to file not found
- B. 0
- C. 1
- D. 2
Answer: D
NEW QUESTION # 45
Which of the following snippets will execute without raising any unhandled exceptions? (Select answers) A)
B)
C)
D)
- A. Option A
- B. Option D
- C. Option B
- D. Option C
Answer: B,C,D
NEW QUESTION # 46
What is the expected behavior of the following code?
- A. it outputs [0, 1, 2, 3, 4]
- B. it outputs [4, 2]
- C. it outputs [2, 4]
- D. the code is erroneus and it will not execute
Answer: B
NEW QUESTION # 47
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
- A. obj_b.prop_a == 3
- B. VarA == 3
- C. hasattr(obj_b, 'prop_aa')
- D. isinstance(obj_c,A)
Answer: B,D
NEW QUESTION # 48
Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers) Expected output:
1 2 3
Code:
- A. c, b, a = a, c, b
- B. a, b, c = c, a, b
- C. c, b, a = b, a, c
- D. a, b, c = a, b, c
Answer: B,C
NEW QUESTION # 49
Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers)
- A. a is not None
- B. b( ) > 2
- C. a is b
- D. a() > 2
Answer: A,B,D
NEW QUESTION # 50
Which of the following lambda function definitions are correct? (Select two answers)
- A. lambda X : None
- B. lambda : 3,1415
- C. lambda lambda: lambda * lambda
- D. lambda x : def fun(x): return x
Answer: A,B
NEW QUESTION # 51
What will be the value of the i variable when the while e loop finishes its execution?
- A. 0
- B. the variable becomes unavailable
- C. 1
- D. 2
Answer: D
Explanation:
NEW QUESTION # 52
What is the expected behavior of the following code?
- A. It outputs 123
- B. it outputs 6
- C. it raises an exception
- D. it outputs 321
Answer: B
NEW QUESTION # 53
Which of the equations are True? (Select two answers)
- A. ord (ord (x)) = = x
- B. ord (chr (x)) = = x
- C. chr (ord (x)) = = x
- D. chr (chr (x)) = = x
Answer: B,C
Explanation:
Reference:
https://docs.python.org/3/library/functions.html#ord
NEW QUESTION # 54
What is the expected behavior of the following code?
- A. it outputs False
- B. it outputs nothing
- C. it raises an exception
- D. it outputs True
Answer: D
NEW QUESTION # 55
An operator able to perform bitwise shifts is coded as (select two answers)
- A. >>
- B. ++
- C. - -
- D. <<
Answer: A,D
NEW QUESTION # 56
Which of the following statements are true? {Select two answers)
- A. a code point is a number assigned to a given character
- B. an escape sequence can be recognized by the / sign put in front of it
- C. ASCII is a subset of UNICODE
- D. II in ASCII stands for Internal Information
Answer: A,C
NEW QUESTION # 57
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. 2 3
- C. 1 2 3
- D. 0
Answer: D
NEW QUESTION # 58
......
Verified PCAP-31-03 dumps Q&As - PCAP-31-03 dumps with Correct Answers: https://www.actualcollection.com/PCAP-31-03-exam-questions.html
The Best Python Institute PCAP Study Guide for the PCAP-31-03 Exam: https://drive.google.com/open?id=1SyS3VlUW6NemNGlr3-2OW9J0K6aL_BNX