PCPP-32-101 PCPP1Certified Professional in Python Programming 1

Loading demo links...

Showing 4–6 of 10 questions

Question 4

Select the true statements about the sqirte3 module. (Select two answers.)

Select all that apply, then click Submit answer.

  • The sqlite3 module provides an interface compliant with the DB-API 2.0.
    The sqlite3 module in python provides an interface compliant to the DB-API 2.0. Thus, it follows a standard performance metric that allows for consistency in database programming with python.

  • The special name memory is used to create a database in RAM.
    The special name 'memory' is used to create a database in RAM using the sqlite3 module. Thus, when you use it as the name of the database file while opening a connection, it creates a temporary database that exists only in memory.
    Reference: Official Python documentation on sqlite3: https://docs.python.org/3/library/sqlite3.html

  • The sqhte3 module does not support transactions.

  • The fetchall method returns an empty list when no rows are available

Question 5

Select the true statements about the json.-dumps () function. (Select two answers.)

Select all that apply, then click Submit answer.

  • It returns a JSON string.
    It returns a JSON string.
    This statement is true because the json.dumps () function takes a Python object as its argument and returns a JSON-formatted string that represents the object. For example, json.dumps ([1, 2, 3]) returns ‘[1, 2, 3]’.

  • It returns a Python entity.

  • It takes a JSON string as its argument

  • It takes Python data as its argument.
    It takes Python data as its argument.
    This statement is true because the json.dumps () function accepts any Python object that can be serialized into JSON, such as lists, dictionaries, strings, numbers, booleans, or None. For example, json.dumps ({“name”: “Alice”, “age”: 25}) returns ‘{“name”: “Alice”, “age”: 25}’.

Question 6

What is the result of the following code?

What is the result of the following code?

Select an option, then click Submit answer.

  • Nothing will be displayed

  • Loading data...

  • Debugging mode has been enabled

  • Debugging mode has been enabled Loading data...