App that converts from letters to numbers

Hello dear colleagues,

I am developing an APP that converts from letters to numbers, that means you have to enter a text and the app should give you back the total of those numbers, having in mind that they are alphabetically ordered. For example:
A-1
B-2
C-3
etc.

When you write down ¨sun¨ it should give you which order is the S, the U and the N alphabetically and afterwards it should show you the total sum of those 3 numbers. In this case:
S-19
U-21
N-14

And the total sum: 54

Any easy ways to have this done ? I am not sure how to sum all the numbers extracted from the letters, having in mind, that you are only inserting letters.

Thank you in advance.

Make a list containing all letters. The letter A will be in the first place on the list, the letter Z in the last. So the indexes of the letters in the list will be the numbers to sum.
When you get a word, you can loop to extract each letter in sequence, then search for that letter in the list and get the letter index, then add this index to the variable.

2 Likes

See here, task in challenge was to create a procedure that you give it a word and it will return the sum of all of its letters according to the numbers corresponding to the letters

2 Likes

Exactly what I described above in words :wink: .

2 Likes

This extension can help you,perhaps.

1 Like

This extension offers different features than what the post author needs.

1 Like

Here are some parts you can use ...

Sample call:

draggable procedure

text_starts_at

lists_position_in

You can hover over these blocks in the Blocks Editor to see their tool tip.
You will also need a text block with abcdefgh...

1 Like


thats it remember the numbers will have a space right of it in values

1 Like

I had made an app with the same idea, just that it supports a lot more characters. See here -https://gallery.appinventor.mit.edu/?galleryid=5308461514883072

1 Like

@Music_369 Are you looking for so called "dollar" words? Cool concept.
EG like contented,
3+15+14+20+5+14+20+5+4=100
source-
http://www.balmoralsoftware.com/dollar.htm

I manage to create what I needed. @HIFI_APPS had what I was looking for. Thanks you all

I am trying to follow you logic, where I need to sum all letters from the textbox (getting the number for each of the letters from the already created dictionary) and sum them in a new line. This is what I was able to do, but it is summing all the numbers I have in my dictionary and giving me 465 as output all the time. What am I missing?

Here you have a ready solution. You marked the topic as resolved and you're still looking for an answer?

1 Like

Your sum procedure only reads the dictionary of all possible letter values.
How do you expect it to give you different results if you don't feed it different numbers?

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