🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Password Storage Lab: all 10 questions

Quiz: Password Storage Lab · Question 10 of 10

Which test would catch a verify function that accepts every password?

Which test would catch a verify function that accepts every password?

  1. A.assert h1 != h2
  2. B.assert not verify("secret#123", h1)
  3. C.assert len(h1) > 20
  4. D.assert "$" in h1
Answer & explanation

Correct answer: assert not verify("secret#123", h1)

Checking that a wrong password fails is the test that detects an "always True" bug.

Can you get the rest right without peeking?

Take the timed Quiz: Password Storage Lab quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →