← 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%}")
- A.25%
- B.50%
- C.75%
- 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 →