# Create block representing one random number

**URL:** https://community.thunkable.com/t/create-block-representing-one-random-number/1042014
**Category:** Questions about Thunkable X
**Tags:** i\_need\_your\_help
**Created:** [January 1, 2021, 6:58am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014 "2021-01-01T06:58:10Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![hyeyoonjeong89](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hyeyoonjeong89/32/100944_2.png) [@hyeyoonjeong89](https://community.thunkable.com/u/hyeyoonjeong89)
#### Post date: [January 1, 2021, 6:58am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/1 "2021-01-01T06:58:10Z")

</div>

I am making a number extraction application.  
I specify a list of numbers from 1 to 100, and then I want to extract a random number.  
I made a block as shown below, but it cannot be expressed.  
How do I modify the block?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/5/f5f071def5f0c92c617cf1404db94c1fea62874f.png)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 1, 2021, 7:10am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/2 "2021-01-01T07:10:33Z")

</div>

Can you show more blocks because I don’t see how the list is filled. The way it is shown now, you are trying to extract a number from the list before it is created.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [January 1, 2021, 7:14am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/3 "2021-01-01T07:14:30Z")

</div>

Your variable number745\_listAgain to list of numbers from 1-100.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/d/5d65f0380285e4b3a15ee6db1340bb3537dcd220.png)  
Then,  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d799a71b42a804aa48d25d1696f4385443579c14.png)  
Hope this helps.  
Happy Thunking!

---

<div class="post-metadata">

### Author: ![hyeyoonjeong89](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hyeyoonjeong89/32/100944_2.png) [@hyeyoonjeong89](https://community.thunkable.com/u/hyeyoonjeong89)
#### Post date: [January 1, 2021, 8:10am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/4 "2021-01-01T08:10:05Z")

</div>

The list block is long, so I expressed it as above.  
Actually I created it like this:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/a/2a537c51c139ae31e4fa513935bcdb7869c17b22.png)

‘to randomNum1’ independent block is below.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/6/86cbfe3d3168faf727a0eab1d9405d1fb0cc0798.png)

---

<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: [January 1, 2021, 8:27am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/5 "2021-01-01T08:27:00Z")

</div>

@codeswept’s response is the correct solution. Have you tried it?

---

<div class="post-metadata">

### Author: ![hyeyoonjeong89](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hyeyoonjeong89/32/100944_2.png) [@hyeyoonjeong89](https://community.thunkable.com/u/hyeyoonjeong89)
#### Post date: [January 1, 2021, 8:33am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/6 "2021-01-01T08:33:11Z")

</div>

yes, I solved it! Thanks:)

---

<div class="post-metadata">

### Author: ![hyeyoonjeong89](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hyeyoonjeong89/32/100944_2.png) [@hyeyoonjeong89](https://community.thunkable.com/u/hyeyoonjeong89)
#### Post date: [January 1, 2021, 8:34am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/7 "2021-01-01T08:34:06Z")

</div>

I solved it!! Thanks for your favor:)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 1, 2021, 8:35am UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/8 "2021-01-01T08:35:50Z")

</div>

As @codeswept suggested, you can create the list of numbers using the component in the list drawer to create a list of sequential numbers.

The key is you can only try to retrieve any number from the list after it is being created. Now the code is there but not executed.

As an example, you need to execute the creation of the list of numbers when the screen starts and therefore you will have something like  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/6/169007a9f15241969a6918b1b2daa267627894fa.png)  
This will make sure that the list is created and ready to be used in you next block of codes which could be associated with a button like this  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/6/d68722f55c0d35c585f7d090d3cdb8227d609c43.png)

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [January 1, 2021, 1:02pm UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/9 "2021-01-01T13:02:08Z")

</div>

Glad it worked!

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:31pm UTC](https://community.thunkable.com/t/create-block-representing-one-random-number/1042014/10 "2024-11-08T13:31:06Z")

</div>


