Free Python Institute PCPP1 Exam Questions

Become Python Institute Certified with updated PCPP1 exam questions and correct answers

Page:    1 / 113      
Total 564 Questions | Updated On: Jun 30, 2025
Add To Cart
Question 1

In Python, there is a handy module, called shelve, that is built on top of pickle, and implements a serialization dictionary where objects are pickled and associated with a key. Therefore, you can open your shelved data file and access your pickled objects via the keys the way you do when you access Python dictionaries. For example:import shelve my_shelve = shelve.open('my_shelve.shlv', flag='c')The flag parameter in the shelve.open() function specifies the mode in which the shelve database should be opened. The default values of the optional flag parameter is set to 'c'. This parameter can accept values like 'r', 'w', 'c' or 'n'. Select the answer that correctly describes these values.


Answer: C
Question 2

Which of the following statements about metaclasses in Python is true?


Answer: C
Question 3

You have the following snippet of code:import abc  class Figure(abc.ABC):     @abc.abstractmethod    def area(self):        pass  class Square(Figure):     def __init__(self, a):        self.a = a     def area(self):        return self.a * self.aWhich of the following statement is true?


Answer: B
Question 4

Complete the following sentence.HTTP protocol. The GET method...


Answer: B
Question 5

Consider the following Python function:def process_data(*args, **kwargs):    if "mode" in kwargs:        mode = kwargs['mode']        if mode == 'sum':            result = sum(args)        elif mode == 'product':            result = 1            for arg in args:                result *= arg        else:            result = None    else:        result = None return resultWhich of the following function calls will correctly compute the product of the given numbers?


Answer: D
Page:    1 / 113      
Total 564 Questions | Updated On: Jun 30, 2025
Add To Cart

© Copyrights DumpsCertify 2025. All Rights Reserved

We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsCertify.