Quiz: user and answers

Well, basically im doing a quiz (don't ask, it's for school lol) about GOW. So, it has this score system where you start at zero and each correct answer adds +20. They are 5 questions so if you do all them right you get a score of 100. The thing is, Im using many screens in order to bring up new questions, this made me begin to have problems as I have to mantain the same variable for each screen to make it work, which it does. Im using some control blocks to do so. Anyway, the problem is that at the beggining, the user needs to write its name. I was wondering if there's a way to keep it saved as i'm already using the blocks for the other variable.



There are more screens but the rest are similar to the last one shown

All of that Can Be done in Just one Screen.
You can Create two vertical arrangements .
One Called Name and other Called questions
You Can Create the answer Picker using Listpicker Or using the Checkbox
(if it's a multiple choice question)
and you can make the "Name" vertical arrangement Invisible after user entered the Name
and After submitting the answer the Question Label changes(shows the next question)
(That's What I do!)
But If you rather using Screen For every question, No problem Just Make Sure to Use TinyDB Component for saving the user's Name And Answers!
storage

so if I used tinydb I'd have to add it in all the screens?

If you are using the data to multiple screens, so you needed the multiple tinyDB if not then only one will do all your work.

what I did its so switch it up and to ask the name at the end of the quiz so then the result and name can be shown. But I dont know how 2 do it as Ihave already used start value and tinydb is not working

Make a list in start Value and use Select by Index block in the list blocks section to get the intersted value.

No Need to Set Start Value for every Screen, Getting Data and storing Data it's possible Using the TinyDB Component. See the blocks And You will Understand This immediately.

I told u its not working for me, Id need a more detailed explanation on that pls

You need to store value In TinyDB After the user entered the question answer, the tag for storing a value In TinyDB it's a question number for example "Q1", And at the end of questions The app asks for user's Name and after that In a new screen It will tell the user The Score the user get, it's a 5 question so IF The answer is correct for each correct answer it gives 20 points Else 0 score for that question. And if the user answer all question correctly It will get 100 Points.
Also if you are wondering how to get the answer the user gives to the question you have to get Value using TinyDB All you need it's Just The Tag
Here is a Example for multiple Screen:
QuestionExample.aia (11.0 KB)
Make sure to change the Design and the Questions to the Questions You want to ask from the user.

1 Like

Use this Aia file to understand what is the locale store means :
TinyDB.aia (4.0 KB)

See these blocks of Screen1 :

See these blocks of Screen2 :

Screen recording video for you reference(which shows how it actually works screen to screen and even after app closed.:

Use this features of tinyDB by your side as per your imaginations you are open to download the AIA file above and do thousands of tests on it. :smile: :+1:.

Guys! I tried it. I dont know what am I doing wrong
image

image

LOL idk what happened but I deleted TinyDB, did it all again and worked lol. Thanks to both of you!!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.