Grab latest Python Institute PCAP-31-03 Dumps as PDF Updated on 2023
Newly Released PCAP-31-03 Dumps for Python Institute PCAP Certified
Topics of PCAP - Certified Associate in Python Programming (PCAP-31-03) Exam
The syllabus for the PCAP-31-03 exam dumps is listed below in detail of each section and their topics:
1. Control and Evaluations (25%)
Objectives covered by this section:
- expanding loops: while-else, for-else, nesting loops, and conditional statements
- basic input and output: input(), print(), int(), float(), str() functions
- controlling loop execution: break, continue
- the pass instruction
- conditional statements: if, if-else, if-elif, if-elif-else
- literals: Boolean, integer, floating-point numbers, scientific notation, strings
- simple strings: constructing, assigning, indexing, slicing comparing, immutability
- simple lists: constructing vectors, indexing, and slicing, the len() function
- string operators: * +
- operators: unary and binary, priorities and binding
- accuracy of floating-point numbers
- formatting print() output with end= and sep= arguments
- Boolean operators: not and or
- building loops: while, for, range(), in, iterating through sequences
- bitwise operators: ~ & ^ | « »
- numeric operators: * / % // + -
- basic concepts: interpreting and the interpreter, compilation and the compiler, language elements, lexis, syntax and semantics, Python keywords, instructions, indenting
- relational operators (== != > >= < <= ), building complex Boolean expressions
2. Data Aggregates (25%)
Objectives covered by this section:
- strings in detail: ASCII, UNICODE, UTF-8, immutability, escaping using the \ character, quotes and apostrophes inside strings, multiline strings, copying vs. cloning, advanced slicing, string vs. string, string vs. non-string, basic string methods (upper(), lower(), isxxx(), capitalize(), split(), join(), etc.) and functions (len(), chr(), ord()), escape characters
- tuples vs. lists: similarities and differences, lists inside tuples and tuples inside lists
- lists in detail: indexing, slicing, basic methods (append(), insert(), index()) and functions (len(), sorted(), etc.), del instruction, iterating lists with the for loop, initializing, in and not in operators, list comprehension, copying and cloning
- tuples: indexing, slicing, building, immutability
3. Functions and Modules (25%)
Objectives covered by this section:
- return and yield keywords, returning results, the None keyword, recursion
- constructing and distributing packages, packages vs. directories, the role of the init.py file
- pyc file creation and usage
- parameters vs. arguments, positional keyword and mixed argument passing, default parameter values
- hiding module entities
- Python hashbangs, using multiline strings as module documentation
- name scopes, name hiding (shadowing), the global keyword
4. Classes, Objects, and Exceptions (25%)
Objectives covered by this section:
- the anatomy of an exception object
- hasattr(), type(), issubclass(), isinstance(), super() functions
- the role of the str method
- class attributes: class variables and instance variables, defining, adding, and removing attributes, explicit constructor invocation
- adding your exceptions to an existing hierarchy
- the init method
- input/output basics: opening files with the open() function, stream objects, binary vs. text files, newline character translation, reading and writing files, byte array objects
- using predefined exceptions and defining your ones
- read(), readinto(), readline(), write(), close() methods
- assertions
- the try-except-else-finally block, the raise statement, the except-as variant
- exceptions hierarchy, assigning more than one exception to one except branch
- class methods: defining and using the self-parameter meaning and usage
- inheritance and overriding, finding class/object components
- defining your classes, superclasses, subclasses, inheritance, searching for missing class components, creating objects
NEW QUESTION 49
What is the expected output of the following snippet?
- A. abc
- B. 0
- C. ABC
- D. The code will cause a runtime exception
Answer: D
Explanation:
NEW QUESTION 50
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 string it's nice to see you will be seen
- D. the code will raise an unhandled exception
Answer: A,B
NEW QUESTION 51
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 52
What is the expected output of the following snippet?
- A. True upper
- B. False upper
- C. False lower
- D. True lower
Answer: A
NEW QUESTION 53
What is the expected output of the following code?
def foo(x,y,z):
return x(y) - x(z)
print{f00(lambda x: x % 2, 2, 1) )
- A. 0
- B. 1
- C. an exception is raised
- D. 2
Answer: B
NEW QUESTION 54
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. len(random. sample([1,2,3],1)) > 2
- B. v1 < 1
- C. v1 == v2
- D. random.choice{[1,2,3]) > 0
Answer: B,D
NEW QUESTION 55
What is true about Python packages? (Select two answers)
- A. __pycache__is the name of a built-in variable
- B. a package can be stored as a tree of sub-directories/sub-folders
- C. hashbang is the name of a built-in Python function
- D. the__name__variable content determines the way in which the module was run
Answer: A,B
NEW QUESTION 56
Assuming that the following code has been executed successfully, selected the expression which evaluate to True (Select two answers)
- A. a is not None
- B. b ( ) == 4
- C. a ! = b
- D. a ( ) == 4
Answer: A,D
NEW QUESTION 57
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 58
Assuming that the following inheritance set is in force, which of the following classes are declared properly?
(Select two answers)
- A. class Class_3(A,C): pass
- B. class Class_4 (D, A) : pass
- C. class Class_1(C,D): pass
- D. class Class_2(B,D): pass
Answer: A,B
NEW QUESTION 59
What is the expected behavior of the following code?
- A. it outputs 3
- B. it raises an exception
- C. it outputs 6
- D. it outputs 1
Answer: C
NEW QUESTION 60
What is the expected output of the following code?
- A. 0
- B. 1
- C. an exception is raised
- D. 2
Answer: B
NEW QUESTION 61
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. Class A.__module__ == ' main__'
- B. __name__== '__main__'
- C. str (Object) = 'Object1
- D. len (ClassB.__bases__) == 2
Answer: A,D
NEW QUESTION 62
What is the expected behavior of the following code?
- A. it outputs 2
- B. it outputs 0
- C. it raises an exception
- D. it outputs 1
Answer: C
NEW QUESTION 63
Is it possible to safely check if a class object has a certain attribute0
- A. yes, by using the hasattr () function
- B. no, it is not possible
- C. yes. by using the hasattr () method
- D. yes, by using the hasattr attribute
Answer: C
NEW QUESTION 64
Which of the following snippets will execute without raising any unhandled exceptions? (Select answers) A)
B)
C)
D)
- A. Option D
- B. Option A
- C. Option B
- D. Option C
Answer: A,C,D
NEW QUESTION 65
What is the expected behavior of the following code?
- A. it outputs 'tuple' object does not support item assignment
- B. it outputs None
- C. 0it outputs list assignment index out of range
- D. the code is erroneous and it will not execute
Answer: A
NEW QUESTION 66
What is the expected output of the following snippet?
- A. the code is erroneous
- B. 0
- C. 1
- D. 2
Answer: A
Explanation:
NEW QUESTION 67
......
Latest PCAP-31-03 Exam Dumps Python Institute Exam from Training: https://www.torrentvalid.com/PCAP-31-03-valid-braindumps-torrent.html
Updated Verified PCAP-31-03 dumps Q&As - 100% Pass: https://drive.google.com/open?id=1QqAcwob2KSBcbr8gnYa5vSQC8qH9_flv