PCPP-32-101: PCPP1 - Certified Professional in Python Programming 1 Dumps
Free Python Institute PCPP-32-101 Exam Dumps
Here you can find all the free questions related with Python Institute PCPP1 - Certified Professional in Python Programming 1 (PCPP-32-101) exam. You can also find on this page links to recently updated premium files with which you can practice for actual Python Institute PCPP1 - Certified Professional in Python Programming 1 Exam. These premium versions are provided as PCPP-32-101 exam practice tests, both as desktop software and browser based application, you can use whatever suits your style. Feel free to try the PCPP1 - Certified Professional in Python Programming 1 Exam premium files for free, Good luck with your Python Institute PCPP1 - Certified Professional in Python Programming 1 Exam.
Question No: 1
MultipleChoice
Look at the following examples of comments and docstrings in Python Select the ones that are useful and compliant with PEP 8 recommendations (Select the two best answers.)
A)
B)
C)
D)
Options
Answer B, DExplanation
According to PEP 8 recommendations, the two best options areOption BandOption D.
Option B follows PEP 8's suggestion that all lines should be limited to 79 characters and for longer blocks of text like docstrings or comments, the length should be limited to 72 characters1. Option D follows PEP 8's conventions for writing good documentation strings (a.k.a. ''docstrings'') which are immortalized in PEP 257.It suggests writing docstrings for all public modules, functions, classes, and methods2.
Question No: 2
MultipleChoice
Select the true statements about the sqlite3 module. (Select two answers.)
Options
Answer C, DExplanation
1. The execute method is provided by the Cursor class
This statement is true because the execute method is one of the methods of the Cursor class in the sqlite3 module. The Cursor class represents an object that can execute SQL statements and fetch results from a database connection. The execute method takes an SQL query as an argument and executes it against the database. For example, cur = conn.cursor (); cur.execute (''SELECT * FROM table'') creates and executes a cursor object that selects all rows from a table.
2. The fetchone method returns None when no rows are available
This statement is true because the fetchone method is another method of the Cursor class in the sqlite3 module. The fetchone method fetches the next row of a query result set and returns it as a single tuple or None if no more rows are available. For example, row = cur.fetchone () fetches and returns one row from the cursor object or None if there are no more rows.