Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How Do I Convert Words To Numbers Easily?
- scratchvirtuoso
-
6 posts
How Do I Convert Words To Numbers Easily?
Hey scratchers,
I'm trying to make a program where a sprite asks the user a question, and they then answer and that answer is converted into numbers.
I've tried many times, but I can't really find the answer for a simple and fast word-to-number converter.
If you do happen to have the answer, please tell me and I will thank you. (I would like an answer as soon as possible)
Thanks everyone,
scratchvirtuoso
I'm trying to make a program where a sprite asks the user a question, and they then answer and that answer is converted into numbers.
I've tried many times, but I can't really find the answer for a simple and fast word-to-number converter.
If you do happen to have the answer, please tell me and I will thank you. (I would like an answer as soon as possible)

scratchvirtuoso
- hello2248
-
100+ posts
How Do I Convert Words To Numbers Easily?
try that, it should work
Last edited by hello2248 (Aug. 22, 2015 18:18:24)
- deck26
-
1000+ posts
How Do I Convert Words To Numbers Easily?
Give an example of the user responses you might get. If the response is all numeric you can just treat it as a number in a calculation and Scratch will convert it so we need to know what you mean.
- daemys
-
100+ posts
How Do I Convert Words To Numbers Easily?
If a string contains only numbers it's a number as well, all the mathematical features are applicable for such strings.
Last edited by daemys (Aug. 22, 2015 19:10:22)
- scratchvirtuoso
-
6 posts
How Do I Convert Words To Numbers Easily?
Thanks everyone for the responses!
And whoever's string I use, I will definitely give credit.
Thanks!
And whoever's string I use, I will definitely give credit.
Thanks!

- scratchvirtuoso
-
6 posts
How Do I Convert Words To Numbers Easily?
Here are a few user example responses:
1. Why did the Chicken cross the road?
2. Hello there!
3. What's your name?

1. Why did the Chicken cross the road?
2. Hello there!
3. What's your name?

- deck26
-
1000+ posts
How Do I Convert Words To Numbers Easily?
Surely those are questions rather than responses! Here are a few user example responses:
1. Why did the Chicken cross the road?
2. Hello there!
3. What's your name?
So what do you mean by converting the answer to numbers? Are you talking about encoding - as in the Encoding section here http://wiki.scratch.mit.edu/wiki/Global_High_Scores
- scratchvirtuoso
-
6 posts
How Do I Convert Words To Numbers Easily?
Don't worry, I've already got everything settled. Thanks everyone, though.
- scratchvirtuoso
-
6 posts
How Do I Convert Words To Numbers Easily?
Also, anyone out there, do you have the code to converting numbers to words easily?
I know, I know. I also need the vice-versa code, though, too.
I know, I know. I also need the vice-versa code, though, too.

- daemys
-
100+ posts
How Do I Convert Words To Numbers Easily?
What you need is called ENCODING and DECODING. Converting numbers to words is a different operation.
- deck26
-
1000+ posts
How Do I Convert Words To Numbers Easily?
The decoding has to match the encoding method so it's hard to advise on decoding without knowing your encoding method.
- LegendaryLion1005
-
2 posts
How Do I Convert Words To Numbers Easily?
I am trying to make something in which the computer asks the user to choose a number and then the computer says the number in words.Is there any simple way to do this?
- deck26
-
1000+ posts
How Do I Convert Words To Numbers Easily?
You should really start your own topic. The best answer for a small enough range (eg 1 to 20) would be a list containing the word version so you can just I am trying to make something in which the computer asks the user to choose a number and then the computer says the number in words.Is there any simple way to do this?
Last edited by deck26 (Nov. 17, 2015 20:55:06)
- Discussion Forums
- » Help with Scripts
-
» How Do I Convert Words To Numbers Easily?