This web application uses a Python-Flask framework to create a vocabulary quiz for users. It works with JSON representations of vocabulary files which can be created in the app.
This app guides a user to create or select existing flashcard decks that they can use in a simple quiz. The quiz is structured to show user a term, have them provide the definition, and tell them if they are correct before proceeding to the next term. This quiz can be played using both browser and Terminal.
Click the image for a link to a video walkthrough of the application.
Here's a walkthrough showing the app's use in Browser and Terminal.
This video show's the app's use in just Terminal.
- Install Python 3
- Install Flask
- Clone/download this repository
- In Terminal change directory to
/VocabQuiz
- To play the game in Terminal, type this into the command line:
$ python quizFunctions.py
- To play the game using the GUI, activate the Flask virtual environment and run Flask:
$ cd venv $ source bin/activate $ cd .. $ flask run
- Open web browser and type this into address bar: http://localhost:5000/
- To stop running the game:
$ ctrl + c $ deactivate (deactivates virtual environment)
The application is made up of the following files:
- init.py - imports Flask, creates app instance, then imports routes from routes.py.
- routes.py - contains all route decorators, imports Python functions from quizFunctions.py, and uses request methods to show and submit client-server data.
- base.html - this is the base template that extends across all templates to keep the style uniform.
- style.css - contains custom CSS for the template.
- HTML templates