Using SQL and Python I created a multiple choice quiz consisting of famous quotes from famous people.
When I first came up with the idea for this project, one of the main components I wanted to integrate into my quiz from the beginning was a “replayability” factor. That is, I wanted the person taking my quiz to be able to repeat the quiz over and over again without ever feeling like the quiz had become repetitive or predictable. This meant changing both the questions that were asked and the answer pool that was supplied for each question. This way a player wouldn’t be able to simply memorize the quiz pool based on the questions that were asked, or the answers that were supplied.
“Don’t Judge each day by the harvest you reap but by the seeds that you plant” – Robert Louis Stevenson
Creating this random element into the quiz was by far the most difficult part of the project. Ultimately, the way I got this feature working was by first creating a pandas data frame containing a copy of my quotee SQL database. This way, after a set of four quotes had been used in a question I could delete them from the pandas data frame and reindex the data frame in order to eliminate the blank spaces that were left by the exhausted quotes. This process allowed me to keep the original SQL database in tact while also maintaining a pandas data frame that was current with the user’s session.
“The only impossible journey is the one you never begin.” – Tony Robbins
Please visit my Github (GitHub – lnatalo712/Tinkering) to take a look at my project in its entirety! I haven’t updated it recently, but I have just begun working on the following features!
- When the quiz is finished, give the user the option to add a famous quote of their own to the quiz pool.
- Implement functions and try/catch blocks within my code.
- Ask the user to create a username before the quiz and keep track of every user’s score in a global leaderboard.
- Create a GUI for the quiz to make it more approachable for people with limited technology/programming experience.