# ...........

**URL:** <https://community.thunkable.com/t/topic/550460>\
**Category:** Off Topic\
**Created:** [April 1, 2020, 7:45pm UTC](https://community.thunkable.com/t/topic/550460 "2020-04-01T19:45:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![a01635401rl](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@a01635401rl](https://community.thunkable.com/u/a01635401rl)\
**Post date:** [April 1, 2020, 7:45pm UTC](https://community.thunkable.com/t/topic/550460/1 "2020-04-01T19:45:02Z")

</div>

Hello, I have a doubt, I need to exchange letters with the blocks  
I have this code (It is a city)  
HGLPV LM GIVMG  
The way it is encrypted is as follows:  
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ  
Where:  
• the letter “a” represents the “Z”,  
• “b” represents “Y”,  
• “c” represents “X”,  
•… successively until reaching  
• the “y” represents the “B”,  
• “z” represents “A”.  
The city is Stoke on Trent  
But I don’t know how I can make the blocks swap the letters.  
I hope someone can help me thank you very much

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 1, 2020, 9:14pm UTC](https://community.thunkable.com/t/topic/550460/2 "2020-04-01T21:14:52Z")

</div>

I would love to help you. I’ll try to do this tonight if nobody is able to help you out!

---

<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 1, 2020, 9:22pm UTC](https://community.thunkable.com/t/topic/550460/3 "2020-04-01T21:22:33Z")

</div>

Do you want the user to click on a blank block and have the better above/below it change to the correct letter (so b is replaced by Y)? Or do you want the user to click a button and the entire city name changes?

---

<div class="post-metadata">

**Author:** ![a01635401rl](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@a01635401rl](https://community.thunkable.com/u/a01635401rl)\
**Post date:** [April 1, 2020, 10:30pm UTC](https://community.thunkable.com/t/topic/550460/5 "2020-04-01T22:30:59Z")

</div>

Thank you! 🙂

---

<div class="post-metadata">

**Author:** ![a01635401rl](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@a01635401rl](https://community.thunkable.com/u/a01635401rl)\
**Post date:** [April 1, 2020, 10:32pm UTC](https://community.thunkable.com/t/topic/550460/6 "2020-04-01T22:32:01Z")

</div>

I think like the first idea, replacing, I mean that if you type BCKL it changes to yxpo when you click a button, or in this case, you are given a variable with an encrypted code (HGLPV LM GIVMG) when you click a button the blocks change the letters to (Stoke on Trent), based on the letter “a” representing the “Z”,“b” represents “Y”, “c” represents “X”, “z” represents “A”, and so on 🙂

---

<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 2, 2020, 12:16am UTC](https://community.thunkable.com/t/topic/550460/7 "2020-04-02T00:16:10Z")

</div>

Here’s a demo:

[https://x.thunkable.com/copy/6750409a457d615fbb6c4fbb5e72cf43](https://x.thunkable.com/copy/6750409a457d615fbb6c4fbb5e72cf43)

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [April 2, 2020, 1:56am UTC](https://community.thunkable.com/t/topic/550460/8 "2020-04-02T01:56:15Z")

</div>

here’s another demo (remixed from the demo of @tatiang - clever strategy! thanks!)  
i noticed that the encoding / decoding is the same in either direction.  
so i’ve modified it so the entry you make is encoded into the input field after the button is pressed. and when you press the button again, it encodes/decodes it back! (the only thing this demo does not do is return the result in lower case - sorry).

[https://x.thunkable.com/copy/e8168c17be48cce66b3c98560ec76004](https://x.thunkable.com/copy/e8168c17be48cce66b3c98560ec76004)

if you still want 2 separate functions then use a table of lower case alphabet in the decode, but use a table of uuper case alphabet for encode - with two separate buttons calling the correct method.

---

<div class="post-metadata">

**Author:** ![a01635401rl](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@a01635401rl](https://community.thunkable.com/u/a01635401rl)\
**Post date:** [April 2, 2020, 6:21am UTC](https://community.thunkable.com/t/topic/550460/9 "2020-04-02T06:21:14Z")

</div>

Thanks everyone for helping 🙂

---

<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, 11:39am UTC](https://community.thunkable.com/t/topic/550460/10 "2024-11-08T11:39:30Z")

</div>


