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

Quiz: LLM Workflow Patterns · Question 3 of 10

What does this print? (code)

What does this print?

from collections import Counter
votes = ["yes", "no", "yes", "yes"]
answer, count = Counter(votes).most_common(1)[0]
print(answer, count / len(votes))
  1. A.yes 3
  2. B.no 0.25
  3. C.yes 0.75
  4. D.yes 1.0
Answer & explanation

Correct answer: yes 0.75

"yes" appears 3 times out of 4.

Can you get the rest right without peeking?

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

Start the quiz →