Discuss Scratch

hoIlisVII
Scratcher
42 posts

Can someone help me find this?

Ok so I'm looking for a custom block that changes multi-word values into a list, with each list item being the different words in the value in order.

For example:
If I input the value “Hello World!” The output would be a list with 2 values, “Hello” and “World!”

So an someone find or make this for me? Thank you!
BlobbyStudios
Scratcher
100+ posts

Can someone help me find this?

forever
if <(letter (increment) of (text)) = [(pretend there's a spacebar here)]> then
repeat <(increment) - (1)>
add (join (letter (secondary increment) of [text])) to [list]
end
end
change [increment] by (1)
end

This is a start, though not completed. It is just a concept, but I feel like it could help if you “see the vision” so to speak.

The general premise is that it increases a variable (increment) by 1 every time it is run, and that basically “scans” through the text looking for the space. Then it would take all the letters that came before the space and “join” them with the others, mashing them all into 1 and putting it into a list.

Powered by DjangoBB