Maximum Grades By Making ready With PCAP-31-03 Dumps UPDATED 2024
Prepare PCAP-31-03 Exam Questions [2024] Recently Updated Questions
Python is one of the most popular programming languages in the world today. It is widely used in various domains, including web development, data analysis, machine learning, and artificial intelligence. Python Institute PCAP-31-03: Certified Associate in Python Programming is a certification program that recognizes individuals who possess the necessary skills and knowledge to work with the Python programming language.
NEW QUESTION # 68
What is the expected output of the following snippet?
- A. 0
- B. 1
- C. 2
- D. the code is erroneous
Answer: D
Explanation:
NEW QUESTION # 69
What is true about Python class constructors? (Select two answers)
- A. super-class constructor is invoked implicitly during constructor execution
- B. the constructor can be invoked directly under strictly defined circumstances
- C. the constructor's first parameter identifies an object currently being created
- D. the constructor cannot use the default values of the parameters
Answer: C
NEW QUESTION # 70
A variable stored separately in every object is called:
- A. an instance variable
- B. an object variable
- C. a class variable
- D. there are no such variables, all variables are shared among objects
Answer: D
NEW QUESTION # 71
Which of the following expressions evaluate to True? (Select two answers)
- A. 'not' not in 'in'
- B. 'in not' in 'not'
- C. 'a' not in 'ABC' .lower ()
- D. ' t '.upper () in 'Thames'
Answer: D
NEW QUESTION # 72
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. the number of lines contained inside the file
- D. 0
Answer: D
NEW QUESTION # 73
What is the expected behavior of the following code?
- A. it outputs 3
- B. it outputs :
- C. the code is erroneous and it will not execute
- D. it outputs 2
Answer: C
NEW QUESTION # 74
What is the expected behavior of the following code?
- A. it outputs <class 'IndexError'>
- B. it outputs error
- C. the code is erroneous and it will not execute
- D. it outputs list assignment index out of range
Answer: D
NEW QUESTION # 75
Which of the following statements are true? (Select two answers)
- A. Python strings are actually lists
- B. Python strings are mutable
- C. Python strings can be concatenated
- D. Python strings can be sliced like lists
Answer: C,D
NEW QUESTION # 76
Which of the following statements are true? (Select two answers)
- A. open () is a function which returns an int that represents a physical file handle
- B. instd, outstd, errstd are the names of pre-opened streams
- C. the second open () argument is optional
- D. if invoking open () fails, the value None is returned
Answer: A,C
NEW QUESTION # 77
How many lines does the following snippet output?
- A. two
- B. four
- C. one
- D. three
Answer: D
NEW QUESTION # 78
There is a stream named s open for writing. What option will vou select to write a line to the stream''
- A. s.write("Hello\n")
- B. s.writeln("Hello")
- C. write(s, "Hello")
- D. s.writeline("Hello")
Answer: A
NEW QUESTION # 79
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
- A. hasattr(obj_b, 'prop_aa')
- B. isinstance(obj_c,A)
- C. obj_b.prop_a == 3
- D. B.VarA == 3
Answer: A,B
NEW QUESTION # 80
Which of the listed actions can be applied to the following tuple? (Select two answers)
- A. del tup
- B. tup [0]
- C. tup.append (0)
- D. tup [:]
Answer: A,D
NEW QUESTION # 81
What is the expected behavior of the following code?
- A. it outputs 1
- B. it outputs 0
- C. it raises an exception
- D. it outputs 2
Answer: C
NEW QUESTION # 82
A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
- A. lambda x, y: x ** y
- B. lambda (x, y) = x ** y
- C. def lambda (x, y): return x ** y
- D. lambda (x, y): x ** y
Answer: A
NEW QUESTION # 83
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Choose two.)
- A. B.VarA == 1
- B. obj_a is obj_aa
- C. A.VarA == 1
- D. isinstance (obj_b,A)
Answer: B,D
NEW QUESTION # 84
What is the expected output of the following code?
- A. an exception is raised
- B. 0
- C. 1
- D. 2
Answer: B
NEW QUESTION # 85
Can a module run like regular code?
- A. yes, and it can differentiate its behavior between the regular launch and import
- B. it depends on the Python version
- C. no. it is not possible; a module can be imported, not run
- D. yes, but it cannot differentiate its behavior between the regular launch and import
Answer: A
NEW QUESTION # 86
......
Give push to your success with PCAP-31-03 exam questions: https://www.trainingquiz.com/PCAP-31-03-practice-quiz.html
PCAP-31-03 100% Guarantee Download PCAP-31-03 Exam PDF Q&A: https://drive.google.com/open?id=1_OHYe7lzIs3UaPskMilA4bKvBBvvyaed

