Open jonathan-d-zhang opened 6 months ago
The fixed questions all look good. Feel free to open a PR with them.
I like the regex idea, that would be cool. I think it would be good as it's own category. Feel free to open a (separate) PR with that if you want (you can also break the idea out into another issue if you think there are any details about behaviour/implementation to discuss first).
The graph idea also sounds cool, though I think it would require a bit more discussion first - I think it would be good to open a separate issue for it. It could be worth looking into if there's a Python package or API that could handle converting a graph to an image so we don't need to worry about installing graphviz.
Description
Add more trivia questions.
Using a format i can copy and paste into a python script to generate the json.
list[tuple[str, list[str], Optional[str]]] = [(question, [answer1, answer2], hint)]
Python
CS
A question I thought would be fun is generating a random directed graph and asking people to find the shortest path between two randomly selected nodes. Variations could be solving TSP, and so on. Would need to send images though, which would require some modifications to a lot of code. Additionally, we would need to bring in another dependency like networkx or graphviz. Maybe this would be turned into another issue/PR? I'm not sure what the protocol for that is, would like thoughts on that from maintainer people.
Another question I thought would be interesting is: "give a string matching this regular expression". And randomly generate regexes. Regex crosswords, even.
Reasoning
More trivia questions good.
Proposed Implementation
Modify the json file for static questions. For the dynamic question we would implement this as a function that generates a graph and associated image.
Would you like to implement this yourself?