Jeremias Lacanienta
Published: 2021-09-24
Total Pages:
Get eBook
PCAP Certified Associate in Python Programming Certification is a comprehensive mock exam with emphasis on using the PCAP-31-03 Syllabus as guide on the question topic. The audience should have basic knowledge in Python or have a good grasp on other programming language because this is not a tutorial. All questions are based on individual topics and all topics have been covered. Some of the topics may not be thoroughly covered but each and every topic in the syllabus have a corresponding question with sufficient representation. Exam block #1: Modules and Packages Objectives covered by the block (6 items) import variants; advanced qualifiying for nested modules dir(); sys.path variable math: ceil(), floor(), trunc(), factorial(), hypot(), sqrt(); random: random(), seed(), choice(), sample() platform: platform(), machine(), processor(), system(), version(), python_implementation(), python_version_tuple() idea, __pycache__, __name__, public variables, __init__.py searching for modules/packages; nested packages vs directory tree Exam block #2: Exceptions Objectives covered by the block (5 items) except, except:-except; except:-else:, except (e1,e2) the hierarchy of exceptions raise, raise ex, assert event classes, except E as e, arg property self-defined exceptions, defining and using Exam block #3: Strings Objectives covered by the block (8 items) ASCII, UNICODE, UTF-8, codepoints, escape sequences ord(), chr(), literals indexing, slicing, immutability iterating through, concatenating, multiplying, comparing (against strings and numbers) in, not in .isxxx(), .join(), .split() .sort(), sorted(), .index(), .find(), .rfind() Exam block #4: Object-Oriented Programming Objectives covered by the block (12 items) ideas: class, object, property, method, encapsulation, inheritance, grammar vs class, superclass, subclass instance vs class variables: declaring, initializing __dict__ property (objects vs classes) private components (instance vs classes), name mangling methods: declaring, using, self parameter instrospection: hasattr() (objects vs classes), __name__, __module__, __bases__ properties inheritance: single, multiple, isinstance(), overriding, not is and is operators constructors: declaring and invoking polymorphism __name__, __module__, __bases__ properties, __str__() method multiple inheritance, diamonds Exam block #5: Miscellaneous (List Comprehensions, Lambdas, Closures, and I/O Operations) Objectives covered by the block (4 items) list comprehension: if operator, using list comprehensions lambdas: defining and using lambdas, self-defined functions taking lambda as as arguments; map(), filter(); closures: meaning, defining, and using closures I/O Operations: I/O modes, predefined streams, handles; text/binary modes open(), errno and its values; close() .read(), .write(), .readline(); readlines() (along with bytearray()) Bonus block Objectives covered by the block (1 item) Uncategorized topics from PCAP-31-01, PCAP-31-02 and PCAP-NP-31-02 Questions in the Practice tests are much more difficult than what is included in the Certified Associate in Python Programming Certification. I recommend doing hands-on to test the validity of the answers and emphasize on the importance of coding different permutations and combinations on the examples given. All questions are self-explanatory and it will be easier to understand if the code is run on IDLE or the user's preferred Python IDE.