How can I implement option for math quiz

Hello there,
I want to implement simple math quiz for my daughter, but I am stuck with hour to display options to select. Among random numbers to show right answer. And this right answer should change place.
The design is the following
screenshot-www.figma.com-2023.08.30-09_40_12
Thanks

On the data type Question

Content = text (23+7)
Answers (List of numbers - 23, 13, 68)
Correct answer (Number - 50)

Display in the repeating group/answer:
This question’s answers:plus item This question’s correct answer:sorted randomly

If answer is clicked and this answer is question’s correct answer, do something, if not, do something else

1 Like

thanks. is it important to use db? Perhaps there is solution without it

Yes you need the database, that’s how you store the questions and answers.

How can i generate list of random answers? I know how to generate one number using Generator from airdev

You can just add alternative answers manually if you’re only adding 4 per question. Or use ‘calculate randomstring’

manually is not an option, to use random should I use backend workflow? Can I do it without backend flow?

Oh, so all of your questions are randomly generated on the page rather than being added by you?

Generate random number 1
Generate random number 2
Answer = generate random number 1 + generate random number 2

Generate a list of numbers from 1 to 99 and sort randomly
Take list of numbers items until #3
Add the Answer number to the Answers list

Display answers list in repeating group below question


I make search by all records, but I have one record in db. How to make it right?

screenshot-bubble.io-2023.08.30-18_00_46
I can’t select “this answer is question’s correct answer”

because you’re clicking type Text, not type Answer

1 Like

How can I add condition that Number 1 + Number 2 <= max
Max - is an limit that user adds


This topic was automatically closed after 70 days. New replies are no longer allowed.