Simple question-answer quiz with streamlit frontend.
Old Disclaimer: Things We Said When We Were Very Stressed (previously just 'Disclaimer') (You may skip it)
this version was made in rush, so what it does is:
- load ./tables/all.xlsx;
- load and parse equations from 2nd col; (NOTE: yeah, we didn't parse the first col, back then)
- show random equations in streamlit frontend
- uses in-console prompts for each step
NOTE: That (first) version was made in a panic, and has since been maintained with relative, almost worrying calm, actually, next versions (firstly) exist and (secondly) differ from that version.
- loads questions and answers from excel table (tables/all.xlsx)
- shows questions in streamlit frontend with (now) some buttons to play with
- supports multiple columns to choose from
-
Prepare tables/all.xlsx:
- HEADER: First row is always a header. It's format should be
<name><type>, where:<name>is of the name you give to this cathegory of questions (e.g. "Math", "History", etc)<type>is either "#QUESTION" or "#MATH". This determines how values of the column will be parsed.
- COLUMN VALUES: All next rows are values of the column. Their format depends on the type specified in header:
- for
#QUESTIONtype:<question>? -> <answer>, where:<question>is the question text<answer>is the answer text
- for
#MATHtype:<equation> = <answer>, where:<equation>: a mathematical equation (question) to be evaluated<answer>: the answer to the equation
- for
- HEADER: First row is always a header. It's format should be
-
Setup the app:
- setup venv, install requirements from ./requirements.txt, enter venv:
python -m venv .venv source .venv/bin/activate # on Windows use `.venv\Scripts\activate` pip install -r requirements.txt
- setup venv, install requirements from ./requirements.txt, enter venv:
-
Run the app:
- Enter the venv environment if not already in it.
- Run the streamlit app:
streamlit run src/main.py
-
The frontend will be opened in new browser tab. From now on you are on your own :)
TODOS:
- Cope with everything written in rush
- Multiple cathegories support
- Interactive streamlit frontend
- Question type support
- CSV
- Multiple columns support (buttons -> checkboxes?)
- Error handling
- UI enchancements
- Choosing table from the frontend
- Bin?
- ostap4ello, 2025