A trivia game about Jane Austen books.
Run austen.py with the --question (or -q) flag to play trivia questions with score tracking:
python3 austen.py --questionor directly:
./austen.py -qWhen prompted, type your answer and press Enter. Answers are evaluated case-insensitively with leading and trailing whitespace trimmed. The game keeps track of correct and incorrect answers, resetting the counters to 0 after 10 questions:
In what year was Pride and Prejudice published?
Your answer: 1813
Correct!
Score: 1 correct, 0 incorrect
To exit the session, send EOF (Ctrl+D) or interrupt (Ctrl+C).
Run austen.py with the --survival (or -s) flag to play in survival mode. In this mode, the game finishes when the player answers incorrectly:
python3 austen.py --survivalor directly:
./austen.py -sRun austen.py with the --duel (or -d) flag to play in duel mode:
python3 austen.py --duelor directly:
./austen.py -dIn this mode, two players take turns answering questions (one question at a time). Each player receives 10 questions for a total of 20 questions in the session. The game tracks correct and incorrect answers for each player independently. After all 20 questions are completed, the session finishes and displays the final scores:
Player 1:
In what year was Pride and Prejudice published?
Your answer: 1813
Correct!
Player 1 Score: 1 correct, 0 incorrect
Player 2:
Who wrote Sense and Sensibility?
Your answer: Jane Austen
Correct!
Player 2 Score: 1 correct, 0 incorrect
To view available command-line options:
python3 austen.py --helpRun unit and integration tests using Python's standard unittest module:
python3 -m unittest discover