🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Checking AI-Written SQL: all 10 questions

Quiz: Checking AI-Written SQL · Question 5 of 10

What does this print? (code)

What does this print?

import sqlite3
db = sqlite3.connect(":memory:")
print(db.execute("SELECT NULL = NULL, NULL IS NULL").fetchone())
  1. A.(1, 1)
  2. B.(0, 1)
  3. C.(None, 1)
  4. D.(None, None)
Answer & explanation

Correct answer: (None, 1)

NULL = NULL is unknown (None in Python); IS NULL is a real test.

Can you get the rest right without peeking?

Take the timed Quiz: Checking AI-Written SQL quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →