Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.89 KB

README.md

File metadata and controls

37 lines (26 loc) · 1.89 KB

PythonFlashCards

Test your Python knowledge through Q&A sessions

The user chooses a Python subject and will be asked questions about methods for that particular subject. After completing the subject Q&A session, the user's accuracy rate will be displayed. Accuracy is measured by number of correct answers divided by total number of questions. Once the Q&A session has ended, the user may choose another subject.

Instructions

You can clone this repository locally and start working on the project. The main files are located in the src folder:

  • qa.py: script the user runs to start the Q&A session.
  • flashcards.py: contains the class for handling the Q&A session.
  • subject.py: contains the class for holding questions and answers from a particular subject.
  • random_subject.py: contains the class for holding questions and answers from random subjects.
  • scorecard.py: contains the class for holding scores for Q&A sessions.

All tests are located in the tests folder:

  • test_flashcards.py: tests to check that the methods in flashcards.py run correctly.
  • test_subject.py: tests to check that the methods in subject.py run correctly.
  • test_random_subject.py: tests to check that the methods in random_subject.py run correctly.
  • test_scorecard.py: tests to check that the methods in scorecard.py run correctly.

Testing requires pytest version 7.2.1 or above, pytest-cov version 4.0.0 or above, and pytest-mock version 3.10.0 or above.

There is a folder named subjects, which contains a questions text file and an answers text file for every Python subject included in this project.

To clone the repository:

To install the required packages for testing:

  • pip install pytest
  • pip install pytest-cov
  • pip install pytest-mock

Contributing

Please read the CONTRIBUTING.md file.