Game 06
// Press ▶ Run — choose a category and test your knowledge
Concepts practiced
Reflection
I built an interactive trivia quiz that lets players choose a category, set the number of questions, and optionally enable a timer, with all question data stored as embedded dictionaries rather than an external file. I learned how to use random.sample for no-repeat question selection, enumerate for clean numbered-choice display, and time.time() deltas for per-question timing. The debugging challenge was handling bad user input gracefully; early versions would crash if someone typed a letter instead of a number. I fixed this by wrapping every int() conversion in a try/except ValueError block and looping until a valid answer was received.