exam questions

Exam PCPP-32-101 All Questions

View all questions & answers for the PCPP-32-101 exam

Exam PCPP-32-101 topic 1 question 42 discussion

Actual exam question from Python Institute's PCPP-32-101
Question #: 42
Topic #: 1
[All PCPP-32-101 Questions]

Select the true statements about the sqlite3 module. (Choose two.)

  • A. The sqlite3 module provides an interface compliant with the DB-API 2.0
  • B. The special name memory is used to create a database in RAM
  • C. The sqlite3 module does not support transactions.
  • D. The fetchall method returns an empty list when no rows are available.
Show Suggested Answer Hide Answer
Suggested Answer: AD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Stokvisss
1 month, 1 week ago
Selected Answer: AD
B is wrong, it's ':memory:'. Hence, A and D are the right ones.
upvoted 1 times
...
claudiupopa
1 month, 4 weeks ago
Selected Answer: AB
D. The fetchall method returns an empty list when no rows are available. This is incorrect. The fetchall() method does indeed return an empty list [] when no rows are available, but the statement is phrased ambiguously. Since no rows are available, fetchall() returns an empty list rather than None, which makes the statement technically true, but it is somewhat misleading since the key point is that the list will be empty, not that no rows are available.
upvoted 1 times
...
Moneybing
4 months, 2 weeks ago
Selected Answer: AD
Seems A,B,D are correct. The standard Python library has a module called sqlite3, providing an interface compliant with the DB-API 2.0 specification. https://edube.org/learn/pcpp1-5/working-with-an-sqlite-database It's also possible to use a special name, :memory:, which creates a database in RAM: conn = sqlite3.connect(':memory:') Other 2 ways to create database: conn = sqlite3.connect('hello.db') conn = sqlite3.connect('C:\sqlite\hello.db') https://edube.org/learn/pcpp1-5/creating-a-database The fetchall method returns an empty list when no rows are available. https://edube.org/learn/pcpp1-5/reading-data-2
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago