This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-05-31 15:45:43

Stitch1436
New Scratcher
Registered: 2012-05-31
Posts: 1

scratch project help urgent!!

hello, i have a scratch project due tongiht and i was wondering if someone could help me, when you create a list how do you remove the letters from a list. we have to take out the i, o , u and y values eg : i have to create an address program, but how do you set so that when the address answers are out they are given shorter. eg normal list: ridge road ... changedlist: rdge rd

Offline

 

#2 2012-05-31 15:57:53

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: scratch project help urgent!!

Have a variable called originalWord, and a variable called newWord. Using your example, set originalWord to "ridge road". Then use this script;

delete [all v] of [vowels v]
add [a] to [vowels v]
add [e] to [vowels v]
add [i] to [vowels v]
add [o] to [vowels v]
add [u] to [vowels v]
set [newWord v] to [] //Nothing.
set [i v] to [0]
repeat (length of (originalWord))
  change [i v] by [i]
  if <[vowels v] contains (letter (i) of (originalWord))>
    set [newWord v] to (join (newWord) | (letter (i) of (originalWord)))
  end
end
Can't be bothered to fix the script. You can tell what I mean. :p

Last edited by RedRocker227 (2012-05-31 16:00:51)


Why

Offline

 

Board footer