← 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))
- A.yes 3
- B.no 0.25
- C.yes 0.75
- 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 →