Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Word Scrambler
- mathwhiz11
-
23 posts
Word Scrambler
Could someone help me come up with a word scrambler? The following steps must happen:
1. The computer must ask the person the number of letters in the word. If the number of letters is less than 3 or greater than 8, the computer must reject it.
2. The computer must ask the person for the word.
3. The computer must scramble the word, however you think best.
Thanks!
1. The computer must ask the person the number of letters in the word. If the number of letters is less than 3 or greater than 8, the computer must reject it.
2. The computer must ask the person for the word.
3. The computer must scramble the word, however you think best.
Thanks!

- lederniersamourai
-
500+ posts
Word Scrambler
For 1) you use
For testing the number of letters you use:
with the test such as
For 2) you do the same as fr step 1), but the user will answer with the word
For 3) this is more difficult. There is no simple solution. You put each letter into a list, then scramble the list, then put back the letters into a new word.
then the answer is put into the variable
For testing the number of letters you use:
with the test such as
For 2) you do the same as fr step 1), but the user will answer with the word
For 3) this is more difficult. There is no simple solution. You put each letter into a list, then scramble the list, then put back the letters into a new word.
- theonlygusti
-
1000+ posts
Word Scrambler
Why ask the length of the word and then the word? Why not just ask for the word?
This can be your entire script:
This can be your entire script:
Last edited by theonlygusti (Oct. 6, 2014 18:20:37)
- lederniersamourai
-
500+ posts
Word Scrambler
Why ask the length of the word and then the word? Why not just ask for the word?
This can be your entire script:end
The problem with this answer, is that you might have given the complete solution to an homework … Hope this was not the case … ;-)
Last edited by lederniersamourai (Oct. 7, 2014 16:02:45)
- mathwhiz11
-
23 posts
Word Scrambler
This is the script I'm going to use. Thank you so much for giving me this! 

Why ask the length of the word and then the word? Why not just ask for the word?
This can be your entire script:
Last edited by mathwhiz11 (Oct. 7, 2014 18:13:43)
- Discussion Forums
- » Help with Scripts
-
» Word Scrambler