Define Functions Python Quizinit Deck Given Deck Initialize Return Empty Quiz Statistics D Q37198150

define functions in python:

quiz_init(deck): Given a deck, initialize and return an emptyquiz statistics dictionary. For example, if the deck contained twocards with ids 1 and 2, the statistics dictionary would return:{‘num_qs’:2, ‘counts’: {1:[0,0], 2:[0,0]}}. See the earlier part ofthis document on representing quiz statistics for more details.

quiz_record(quiz_stats, card, answer): Given an initialized quizstatistics dictionary, a single card from the quiz, and the stringof the answer, update the statistics directory (the counts for thegiven card). Return True if they got the answer right and False ifthey did not. Again, we are only doing STR questions at the moment,so currently the answer

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.