# I want to make a roulette

**URL:** <https://community.thunkable.com/t/i-want-to-make-a-roulette/1763619>\
**Category:** Questions about Thunkable X\
**Created:** [March 2, 2022, 1:34pm UTC](https://community.thunkable.com/t/i-want-to-make-a-roulette/1763619 "2022-03-02T13:34:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qortmd3592st](https://avatars.discourse-cdn.com/v4/letter/q/d07c76/32.png) [@qortmd3592st](https://community.thunkable.com/u/qortmd3592st)\
**Post date:** [March 2, 2022, 1:34pm UTC](https://community.thunkable.com/t/i-want-to-make-a-roulette/1763619/1 "2022-03-02T13:34:52Z")

</div>

I want to make a roulette. When the user rotates the roulette, there is a 10% chance of 10 coins, 20% chance of 1 coin, and 70% chance of losing. How do you make harmony? Is there a way to put this function in the thunkable?

---

<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:** [March 2, 2022, 2:44pm UTC](https://community.thunkable.com/t/i-want-to-make-a-roulette/1763619/3 "2022-03-02T14:44:17Z")

</div>

Set app variable outcome to random 1 to 100  
If app variable outcome \<= 10 then \_\_\_\_\_  
elseif app variable \<= (10+20) then \_\_\_\_\_\_  
Elseif app variable \<= (10+20+70) then \_\_\_\_\_

These conditions are in the following order:  
10%  
20%  
70%

Also, here’s a similar method with a screenshot of blocks:

> [@Weighted randomness](https://community.thunkable.com/t/weighted-randomness/869597/2):
>
> It is possible. This code will make the job done [image] -Roumak

---

<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:** [May 31, 2022, 2:44pm UTC](https://community.thunkable.com/t/i-want-to-make-a-roulette/1763619/4 "2022-05-31T14:44:55Z")

</div>

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