# I want to build "Which Harry Potter character are you?" app

**URL:** https://community.thunkable.com/t/i-want-to-build-which-harry-potter-character-are-you-app/1841599
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [April 21, 2022, 10:04am UTC](https://community.thunkable.com/t/i-want-to-build-which-harry-potter-character-are-you-app/1841599 "2022-04-21T10:04:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![adisa.aswptse6](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@adisa.aswptse6](https://community.thunkable.com/u/adisa.aswptse6)
#### Post date: [April 21, 2022, 10:04am UTC](https://community.thunkable.com/t/i-want-to-build-which-harry-potter-character-are-you-app/1841599/1 "2022-04-21T10:04:26Z")

</div>

Hello.  
I want to build “Which Harry Potter character are you?” app, but don’t know how to link a different question for each choices, and get different ending.  
( If Q1 ans a → Q2 → ans a → Q4 → ans a → Yes! you are Harry Potter.  
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_–\> ans b → you are Ron Weasley.  
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ → ans b → Q5 …  
\_\_\_\_\_ans b → Q3 → ans a → Q6 …  
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_–\> ans b → Q2 …  
like this)  
Please help! I put some block together but cannot find a way to do so …T T  
Thank you.

---

<div class="post-metadata">

### Author: ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)
#### Post date: [April 21, 2022, 10:43am UTC](https://community.thunkable.com/t/i-want-to-build-which-harry-potter-character-are-you-app/1841599/2 "2022-04-21T10:43:58Z")

</div>

The fastest method i can think of is this:  
I assume that you have many questions to ask in order, lets say A, B, C, D, E, F …  
I also assume that every question has multiple answers, lets say 4 for each, like 1,2,3,4 (you can set question to a label, and answers to labeled buttons that once pressed will display you the next question and so on).  
All you have to do is to define a variable (lets call it xANSERS) that will grow as answers are given:

- before first quest xANSWERS=.null.
- after first question will be xANSWERS=“1” (if user answered choosing 1st answer, for example)
- after 2nd question will be xANSWERS=“13” (if user answered choosing 3rd answer, for example)
- after 3rd question will be xANSWERS=“131” (if user answered choosing 1st answer… and so on  
After all questions have been anwered, you simple use some **if else if block**  
So, **if** xANSWERS =“1111…” then user is like …  
**else if** xANSWERS="1211… and so on…

---

<div class="post-metadata">

### Author: ![adisa.aswptse6](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@adisa.aswptse6](https://community.thunkable.com/u/adisa.aswptse6)
#### Post date: [April 24, 2022, 1:26pm UTC](https://community.thunkable.com/t/i-want-to-build-which-harry-potter-character-are-you-app/1841599/3 "2022-04-24T13:26:32Z")

</div>

Great idea! Thank you so much. Very helpful. 👍 👍 👍

Actually, what I tried to figure it out, is how to get to the next question in specific order depends on the answers.  
For example:

- Question : A B C D E F G … Z

- Answer : 1 2 3 4

- Ending answer : Harry Ron Hermione Dobby …

- First Question will be A → if you answer 1 it will jump to question D, answer 2 jump to question B, answer 3 jump to question C, answer 4 jump to question F

- Let’s say I choose ans 1 which jump to question D. And question D has 4 answers that will jump to the 4 different questions.

Second problem is how to get to the ending answer by your method.

- if I do 10 question’s round, that make 4^10 ways of xANSWERS.

🤔 🤔 🤔  
so confused right now 🤔

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [April 24, 2022, 4:37pm UTC](https://community.thunkable.com/t/i-want-to-build-which-harry-potter-character-are-you-app/1841599/4 "2022-04-24T16:37:50Z")

</div>

> [@adisa.aswptse6](#):
>
> - if I do 10 question’s round, that make 4^10 ways of xANSWERS.

Instead of thinking of it that way, you need to weight your answers. So for each question, the four answers each add a value to a running total. Let’s assume that for question A\*, answer 1 is related to Harry and answer 2 is related to Hermione. If the user answers 1, you add 1 point to app variable HarryTotal. If the user answers 2, you add 1 point to app variable HermioneTotal, etc.

Then, when all of the questions are answered, you check to see which variable has the highest value and that is the character the user matched with. If there’s a tie, then you decide what to do (I would either announce that they matched two characters – it could be fun to provide a percentage for all _four_ characters – or you just pick one at random to be the match).

> [@adisa.aswptse6](#):
>
> - First Question will be A → if you answer 1 it will jump to question D, answer 2 jump to question B, answer 3 jump to question C, answer 4 jump to question F

Nope, I’d keep this really simple and just have a set of questions that you display in random order. No jumping around… just move the user through them straight from 1 to 10 or however many questions you end up having. The weighted answers above will take care of everything else.

\*Personally, I’d recommend numbering the questions and using letters (if you even need them) for the answers. It’s confusing to me to think about the 4th question being “D” instead of just #4.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [July 23, 2022, 4:38pm UTC](https://community.thunkable.com/t/i-want-to-build-which-harry-potter-character-are-you-app/1841599/5 "2022-07-23T16:38:46Z")

</div>

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