Day 23 of the Anvil Advent Calendar

Build a web app every day until Christmas, with nothing but Python!

Make a Christmas Quiz

Last year I found myself doing a lot of online Christmas Pub Quizzes. Hopefully, this year will have a lot more in person gatherings, but it’s still fun to have a remote quiz when you are far away from friends and family!

So, this year I made a Christmas quiz in Anvil. You can have a look here:

How it works

The app presents participants with each question without asking for an answer. Then, once all the questions have been seen, players can submit their answers and the app will reveal whether or not they’re correct.

All the questions and answers are stored in a Data Table, meaning that if you want to make your own quiz app, all you’ll have to do is clone this one and change what’s in that table.

The question and answer pages then pull their information directly from the table, using Data Bindings to cut down on the code needed. Then, whenever the button is clicked, the app proceeds to iterate through all the questions in the table.

Follow the link below to clone the app, see the code, and make your own Christmas quiz!

Give the Gift of Python

Share this post: