Multiple answer quizz

Hello! I want to make a quiz app with multiple answers and the information to be taken from a table. I made a part of it, but I struggle to verify the answers when more than one are correct.

Let me give you an example :
Question - Which of these are numbers?
Answer 1 - thapoijn
Answer 2 - 10
Answer 3 - oiphjquhg
Answer 4 - 197

When the user taps on “verify answer”:
If he selected answer 2 and 4, the answer will be correct.
If he selected answer 2, the answer will be incorrect.
If he selected answer 2 and 3, the answer will be incorrect.

We can’t help you without seeing your blocks. We’d just be guessing in the dark.


I made a list for the correct answers and a list for the user’s answers. I have to compare them, but I need them to be the same even if the numbers are in the same order. Can you help me?
List 1 [1,3,5]
List 2 [1,5,3]
How do I compare them so that List 1=List 2 ?

… If your lists to compare have the same length, the easiest solution i can think at this late hour (here, In Romania :relaxed:) is to just sort them and compare:


Sort as number, or text, whatever fits your needs.

5 Likes

Very nicely solved!

Thank you very much! Can you also help me to color with green the correct answers and with red the wrong answers?

This tutorial will be helpful if you want to let the user choose an answer from a list of answers

2 Likes


This is what I have come up with but it doesn’t fully work. Any ideea why?

What does “it doesn’t fully work” mean exactly?

It means that when I choose the correct answer it colors the button red instead of green. Excuse me if I was not specific enough and thank you for everything!

Can you show the rest of the blocks from that screen? I can’t see where you call the functions or the screen opens/starts event so it’s hard to know why it isn’t working for you.

Unfortunately, the quality of that screenshot is low and I can’t see the blocks clearly.


Is this any better?

Not really, no. It’s a 220 Kb screenshot at 1920x1080 resolution. So it’s going to be blurry when it’s enlarged at all.