kostascoffee Posted January 22, 2020 Posted January 22, 2020 Hello, I hope someone could help with this. I have been tasked with creating a Scratch program which the user can input a word into, and the vowels (in this case: a,e,i,o,u) in the word turn to $ instead of the vowel. The answer is then shown. Would anyone have the script for this? I have been trying for hours and got nowhere! Many Thanks, Stam
kostascoffee Posted January 22, 2020 Author Posted January 22, 2020 Try this...[ATTACH]56445[/ATTACH] Any help with this one? The way they have worded it is very confusing, any help would be great! You seem to know exactly what you're doing! Thank you!
TomHD Posted January 22, 2020 Posted January 22, 2020 (edited) Any help with this one? The way they have worded it is very confusing, any help would be great! You seem to know exactly what you're doing! Thank you![ATTACH=CONFIG]56448[/ATTACH] Try this... for kostascoffee 2.zip The wording was clear enough imo NOTE: you can delete variable "l" as it is unused! Edited January 22, 2020 by TomHD
kostascoffee Posted January 22, 2020 Author Posted January 22, 2020 Can I ask, why the use of the letters j i k l ? just curious to see if I can replicate this and make sense of it myself without directly copying it. It will also help me understand a bit more! I appreciate all the help so far!
TomHD Posted January 22, 2020 Posted January 22, 2020 i, j and k are indexes for looping through the lists. You can just use i and reset it to 0 before each loop but by using different letters you can see where and how they relate to each loop hope that helps? You can remove L completely as it is not used in my example
kostascoffee Posted January 22, 2020 Author Posted January 22, 2020 Ok, so I need to figure out how to add those in!
TomHD Posted January 22, 2020 Posted January 22, 2020 Ok, so I need to figure out how to add those in! for kostascoffee 2 single index variable.zip this example only uses i for indexing compare the 2 examples to see how that works
kostascoffee Posted January 22, 2020 Author Posted January 22, 2020 This is what i've got so far, from top to bottom. We have to use the settings/definitions they have already set.. so i'm trying to make sense of it. So far, it hasn't worked. At least I havent seen the numbers go from unsorted_list to pigeonholes.
TomHD Posted January 22, 2020 Posted January 22, 2020 This is what i've got so far, from top to bottom. We have to use the settings/definitions they have already set.. so i'm trying to make sense of it. So far, it hasn't worked. At least I havent seen the numbers go from unsorted_list to pigeonholes. [ATTACH=CONFIG]56455[/ATTACH][ATTACH=CONFIG]56456[/ATTACH] Can you zip up your Scratch file and attach to the thread please?
kostascoffee Posted January 22, 2020 Author Posted January 22, 2020 just realised i hadn't even done the ​when c key pressed ​ part yet!
TomHD Posted January 22, 2020 Posted January 22, 2020 (edited) On the "make_pigeonholes", in the final repeat loop, change "set number to item i of pigeonholes" to "set number to item i of unsorted_list" you were basically setting "number" to the empty value in pigeonholes where you wanted to actually set the value from unsorted_list Whilst working on the scripts its worth showing the variable on screen as that helped me to see that "number" was never set to anything Get the M function working first Edited January 22, 2020 by TomHD
TomHD Posted January 22, 2020 Posted January 22, 2020 No probs, you were really close let me know if you get stuck on the "C" function
kostascoffee Posted January 22, 2020 Author Posted January 22, 2020 All done! There are a few more bits, I might need a hand with, if thats okay! I really appreciate this!
TomHD Posted January 22, 2020 Posted January 22, 2020 Yeah no probs, probably better to pop me a PM for anymore, save cluttering the forums best of luck
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now