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

Quiz: Evaluating LLM Apps · Question 6 of 10

What does this print? (code)

What does this print?

tests = [("fee date?", "fees"), ("result missing", "exams"), ("canteen?", "other"), ("bunk friday", "attendance")]

def classify(m):
    return "fees" if "fee" in m else "exams" if "result" in m else "other"

passed = sum(classify(msg) == label for msg, label in tests)
print(f"{passed / len(tests):.0%}")
  1. A.25%
  2. B.50%
  3. C.75%
  4. D.100%
Answer & explanation

Correct answer: 75%

Only "bunk friday" is wrong (got other, expected attendance).

Can you get the rest right without peeking?

Take the timed Quiz: Evaluating LLM Apps quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →