Hello. My name is Taylor Simpson, I have a quiz coded in Python and attempting to get it published to the web through Anvil.
The image classifier post doesn’t seem to match what I need, what I have is the following
-a DataFrame from imported CSVs
-a for loop that goes through the dataframe to creates lists of questions and answers
-a quiz coded with an input, if/else statement, and printed statement saying number of correct answer
Anyone have something similar they’ve coded they’d be willing to share or willing to help at all?
If so let me know via the forum or by email at taylorjsimpson18@gmail.com
Thanks!
-Taylor
Hello and welcome,
If I understand the question, you are asking for examples of a quiz made in Anvil.
I don’t have an example to show, but if you have not already done so, please go through the introductory Anvil tutorials as you may find one that teaches concepts that you can use for your quiz (e.g., a repeating panel, DataTables, buttons, etc…).
If I had to guess, I would say you would need a repeating panel of questions and answer fields. When a button is clicked, the answers get sent to the Anvil Database (so called DataTables). The percentage correct is then sent back to the browser for the user to see.
Good luck with your development and feel free to post here if you have a more specific question. Certainly, making a quiz in Anvil is definitely possible.
2 Likes
Hi Campopianoa,
Thanks for the response! I think you’re onto something there, I’ll try that out.
-Taylor
Hi Campopianoa,
Follow up question: I can’t seem to find any tutorials for repeating panels. I’ve been stuck trying to figure this out for days now and can’t seem to make any progress.
I’ve put together a list of where I am at now…
WHERE I AM AT
I have anvil set up where I can have a name entered and then a message saying “HELLO” blank.
WHAT I WANT
To be able to input an answer and have that go to the data table, and then get a message saying if that’s a correct match or not
HOW TO DO THIS
The repeating panel of questions and answers seems like a good idea, but where can I place it? I can not place it on the Data Tables services, which is where I think I would need to have it for any type of being able to check an inputted answer off of a question.
This is the step I am stuck on. Any ideas of what I could do?
Thanks!
-Taylor
The first tutorial listed on the “learn” page shows an example of a text box accepting data, sending that data to the DataTable, and returning a message to the user.
All that is left now is to extrapolate this to many instances of the same type of thing.
For this, one way to go (assuming many question types are of a similar structure), is to use a repeating panel.
Please see here for the documentation on using a repeating panel. You will also find a tutorial there.
2 Likes