# Picking between two quesiton

**URL:** <https://cl.desmos.com/t/picking-between-two-quesiton/3592>\
**Category:** Questions\
**Created:** [August 11, 2021, 5:46pm UTC](https://cl.desmos.com/t/picking-between-two-quesiton/3592 "2021-08-11T17:46:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeewant\_Kaushal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeewant_kaushal/32/1184_2.png) [@Jeewant\_Kaushal](https://cl.desmos.com/u/Jeewant_Kaushal)\
**Post date:** [August 11, 2021, 5:46pm UTC](https://cl.desmos.com/t/picking-between-two-quesiton/3592/1 "2021-08-11T17:46:37Z")

</div>

Hi Gang,

I’m trying to see if there is a way to do something in CL where I can enter in two or more questions which get picked randomly for the students

example: -5^2 and -4^2

Also then how would the CL look for the picking the correct answer of -25 or -16 based on the question that the student gets. How would this look is I used math input or from time to time If I use tables.

Since i’m not that good with the random generating numbers/equations and such yet I figure this would be a good start for me, if it is possible.

If this is possible can anyone create/share an example for it that I can use.

Any and all help is super appreciated in advance!

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [August 11, 2021, 6:05pm UTC](https://cl.desmos.com/t/picking-between-two-quesiton/3592/2 "2021-08-11T18:05:29Z")

</div>

I recently [saw an example](https://teacher.desmos.com/activitybuilder/custom/5f5a43ba38f8b120d3229afd) of your idea, but with equations. I would suggest building one with set examples in order to get the flow working correctly. Once that is working, then add in the random numbers. I’ve posted a few basic activities on here that use random number generators as well. If a search doesn’t work, I’ll see if I can find them.

---

<div class="post-metadata">

**Author:** ![Jeewant\_Kaushal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeewant_kaushal/32/1184_2.png) [@Jeewant\_Kaushal](https://cl.desmos.com/u/Jeewant_Kaushal)\
**Post date:** [August 11, 2021, 9:27pm UTC](https://cl.desmos.com/t/picking-between-two-quesiton/3592/3 "2021-08-11T21:27:39Z")

</div>

Thanks @cwinske that was helpful. I think I was able get a work in progress going. For now this approach is ideal for me until eventually I can raise my noob level 😂

I have another question about randomly picture between two images. Im having a hard time replicating that using the same CL code on slide 3. I would really appreciate if you could help me with that one.

Here is the work in progress [desmos](https://teacher.desmos.com/activitybuilder/custom/61142ea7714c75b17fa6b2f6)

Much thanks in advance!

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [August 12, 2021, 2:25am UTC](https://cl.desmos.com/t/picking-between-two-quesiton/3592/4 "2021-08-12T02:25:47Z")

</div>

You’ll want to only generate one random number. You can put the CL in any of the components, but I would personally put it in the note. Move the code that you have in the media components for generating the random number to the note, then you can put this code in the first media component:

```auto
hidden: note.script.d3=2

```

And this in the second media component:

```auto
hidden: note.script.d3=1

```

Make sure to name your note component to match the code.

---

<div class="post-metadata">

**Author:** ![Jeewant\_Kaushal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeewant_kaushal/32/1184_2.png) [@Jeewant\_Kaushal](https://cl.desmos.com/u/Jeewant_Kaushal)\
**Post date:** [August 12, 2021, 2:39am UTC](https://cl.desmos.com/t/picking-between-two-quesiton/3592/5 "2021-08-12T02:39:16Z")

</div>

Thanks for coming through again! I’m able to get the two pictures generated

Even though its working, CL is showing there is an error. I can’t seem to figure out how to fix that.

 ![Screenshot 2021-08-11 9.36.22 PM](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/6/603f74150c555e0965b90275e112a09ba6791918.png)

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [August 12, 2021, 2:55am UTC](https://cl.desmos.com/t/picking-between-two-quesiton/3592/6 "2021-08-12T02:55:13Z")

</div>

You can delete that line of code – it’s not needed.

---

<div class="post-metadata">

**Author:** ![Jeewant\_Kaushal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeewant_kaushal/32/1184_2.png) [@Jeewant\_Kaushal](https://cl.desmos.com/u/Jeewant_Kaushal)\
**Post date:** [August 12, 2021, 3:29am UTC](https://cl.desmos.com/t/picking-between-two-quesiton/3592/7 "2021-08-12T03:29:18Z")

</div>

Thank you so much for all your help. Much appreciated in the continuing journey of learning CL
