# Variable not updated

**URL:** <https://cl.desmos.com/t/variable-not-updated/5413>\
**Category:** Questions\
**Created:** [March 12, 2024, 3:40am UTC](https://cl.desmos.com/t/variable-not-updated/5413 "2024-03-12T03:40:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![valdel](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/valdel/32/3785_2.png) [@valdel](https://cl.desmos.com/u/valdel)\
**Post date:** [March 12, 2024, 3:40am UTC](https://cl.desmos.com/t/variable-not-updated/5413/1 "2024-03-12T03:40:02Z")

</div>

In the activity linked below, I am trying to convert a base 10 number into one with any other lower base. It works the first time, however from the second time onwards a new base is not updated. I would appreciate any suggestions to overcome this problem.

> **[Teste sobre conversão de bases • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/65eab206554b29bb42cc00d9?lang=pt-BR)**
>
> Esta atividade é a primeira em que tentamos usar a calculadora gráfica para programação de fato! Ou seja, nela tentamos usar de controles de fluxo, e operadores lógicos (construídos por nós mesmo) para criar uma subrotina que executa um loop

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [March 12, 2024, 4:18am UTC](https://cl.desmos.com/t/variable-not-updated/5413/2 "2024-03-12T04:18:11Z")

</div>

I apologize. It’s difficult to help out because I don’t understand Portuguese! It looks like your graph may have some circular dependencies, which may be okay in other coding languages, but not in Desmos. You’ll have to use some lists. Here’s my attempt at a conversion (currently on Screen 1).

> **[Examples for Forum • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/659c0a8340157b4014b5cac0#preview/3f9b73e1-9b1e-460e-991a-baa2299e250e)**
>
> by Daniel Grubbs

---

<div class="post-metadata">

**Author:** ![valdel](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/valdel/32/3785_2.png) [@valdel](https://cl.desmos.com/u/valdel)\
**Post date:** [March 12, 2024, 9:13am UTC](https://cl.desmos.com/t/variable-not-updated/5413/3 "2024-03-12T09:13:57Z")

</div>

Thank you so much! The solution you suggested worked great!

Note: From next time I will post everything in English

---

<div class="post-metadata">

**Author:** ![valdel](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/valdel/32/3785_2.png) [@valdel](https://cl.desmos.com/u/valdel)\
**Post date:** [March 12, 2024, 2:55pm UTC](https://cl.desmos.com/t/variable-not-updated/5413/4 "2024-03-12T14:55:20Z")

</div>

The solution is still incomplete! For example, when we take 16 in base 10, we should have 10000 in base 2. But only 0 appears. The 1 is missing at the beginning.

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [March 12, 2024, 3:08pm UTC](https://cl.desmos.com/t/variable-not-updated/5413/6 "2024-03-12T15:08:20Z")

</div>

In the graph, line 5, change `<n` to `<=n`. Also your other issue will be attempting bases larger than 10.

---

<div class="post-metadata">

**Author:** ![valdel](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/valdel/32/3785_2.png) [@valdel](https://cl.desmos.com/u/valdel)\
**Post date:** [March 12, 2024, 3:26pm UTC](https://cl.desmos.com/t/variable-not-updated/5413/7 "2024-03-12T15:26:37Z")

</div>

Thanks!

Yes, for larger bases I must insert letters of the alphabet.

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [March 12, 2024, 3:30pm UTC](https://cl.desmos.com/t/variable-not-updated/5413/8 "2024-03-12T15:30:24Z")

</div>

This is not something that can be done with a single value in Desmos. You’d have to manipulate a pointLabel in the CL, but there’s not currently any nice way to play with lists there.
