MCPcopy
hub / github.com/bregman-arie/devops-exercises / get_random_question

Function get_random_question

scripts/question_utils.py:59–62  ·  view source on GitHub ↗
(question_list: List[str], with_answer: bool = False)

Source from the content-addressed store, hash-verified

57
58
59def get_random_question(question_list: List[str], with_answer: bool = False) -> str:
60 if with_answer:
61 return choice(get_answered_questions(get_file_content()))
62 return choice(get_question_list(get_file_content()))
63
64
65"""Use this question_list. Unless you have already opened/worked/need the file, then don't or

Callers

nothing calls this directly

Calls 3

get_answered_questionsFunction · 0.85
get_file_contentFunction · 0.85
get_question_listFunction · 0.85

Tested by

no test coverage detected