How to see result after user answer all question (Quiz App)

Hello, I’m new in Thunkable

So, i do my project which is “Measure Stress by Questionnaire”. I have 41 question and has put it in thunkable, mean to answer and see score work well.

But after answer all question, i want to make “Result Screen” mean the user able to see their final score. I dont know how to do it.

Can someone help me. Thanks

Here my project: Thunkable
Here the screenshot:



Hi @safwanadol98j0

Welcome to the community!

I made a quiz app not too long ago, which has a results screen. You can check it out and remix it if you need.

https://x.thunkable.com/copy/718faa30fd31f2be6d6e2ea483b84429

Hope that helps.

2 Likes

hi there @safwanadol98j0 welcome!
here is probally the answer you are looking for.
https://x.thunkable.com/copy/d25c1ed8c0e7070852169cbf3c1265d0
this is your project only added this to change qeustion:


Hope that helps!
Cheers

2 Likes

Thanks mate @lukehoogenboom0i !!
If you dont mind. Can you help me for another problem?

So, at the “Result Screen”… it have score rating. For example:

if user get (Score:19), it will give description like this (Your Stress is Low)

  1. Score: 0-19 (Your Stress is Low)
  2. Score: 20-39 (Your Stress is Moderate)
  3. Score: 40-49 (Your Stress is High)
  4. Score: 50 and above (Your Stress is Very High)

I hope you understand, what i mean. Hope you can help me.
Thanks :slight_smile:

2 Likes

You can use an If/else block for that.

2 Likes

@safwanadol98j0 you would want this.

image

1 Like

Yep its like @human says

1 Like

You can actually do this more simply, since this is one big if / else if statement. For the first else if, you already know the label is >19 (unless negative values are possible?), so you can just check that the value is <39, for the next one that it is <59, etc.

Does it matter? Probably not unless you’re going to do a LOT of comparisons (or you’ve got database access/stored variables/cloud variables built into those comparisons), but you’ll drag fewer blocks if you take advantage of the way if/else if works.

2 Likes

I didn’t suggest a nested loop?

That’s how I do that sort of conditional check, too.

If <20 do "Your Stress is Low."
else if < 40 do "Your Stress is Moderate"
else if < 50 do "Your Stress is High"
else do "Your Stress is Very High"
2 Likes

Yeah, I see what you mean now @catsarisky

But if the users score is 10, then it will display YOUR STRESS IS HIGH, wouldn’t it?

No. Because the first conditional statement checks to see if the score is less than 20. Since 10 is less than 20, that statement evaluates as true and the string “Your Stress is Low” is assigned.

1 Like

Which block should i put? Question Screen or Result Screeen?
or can you do it in my project.

You said you wanted to check their score on the Result screen so I would do it there.

Look at the if/else if blocks @human posted above. See if you can construct something similar. The difference is that you’ll use the equals (=) block from the Logic drawer. You can find the number blocks in the Math drawer.

If you still need help, post a screenshot of the blocks you’re using and explain what happens when you preview your project.

1 Like

Here


But when i live test, its not working

Hmm. That looks like it should work except for the fact that you’re comparing text to numbers. You need to compare numbers to numbers.

I also generally avoid using labels in comparison blocks (≥, <, =, etc.). You can use them but it’s best to stick to variables for that sort of thing.

So… you need to convert your score to a number. If it’s already a number in app variable score then just use that instead of YourScore's Text in all your blocks above.

I’m guessing that’s the case. If not, then convert the app variable score value to a number by adding zero (0) to it. If you add zero to a text string, it becomes a number.

2 Likes

Another issue:
YourScore’s text would be Score : 15 (or something like that), so you’d be comparing “Score : 15” against your numbers. You’ll have to use your variable.

2 Likes

I didn’t realize my example could be so misleading. Here’s what you may really need.

The only change I made to this program was switching the “Label1’s Text” to “app variable score.”

2 Likes