Discuss Scratch
- Discussion Forums
- » Suggestions
- » Pick random (A) to (Z)
- VeryFamus
- Scratcher
1000+ posts
Pick random (A) to (Z)
This suggestion is to allow letters to be randomized in the pick random block.
For example,
Pros:
allows easier letter randomization
Cons:
Can’t think of any
Edit: letters don’t show as variables (the arrows downward are just for proper visual effect)
For example,
(Pick Random (a v) to (z v) :: operators)Would select a random letter from the alphabet.
(Pick random (f v) to (t v) :: operators)Would check between those, etc. This could be useful because it’s much more convenient than setting random 1-10 and “if, then else” ing for each possible result to set to a letter.
Pros:
allows easier letter randomization
Cons:
Can’t think of any
Edit: letters don’t show as variables (the arrows downward are just for proper visual effect)
Last edited by VeryFamus (Dec. 10, 2021 01:22:14)
the old mythical legend has appeared
some know me as the guy who only posted in suggestions
be high contrast
Lamp oil, rope, bombs. You want it? It’s yours my friend. As long as you have enough rupies.
- CatGuyAnimates
- Scratcher
100+ posts
Pick random (A) to (Z)
instead of using if/elses you can make a list of all possible results(works with anything, not just letters/numbers, but words too!) then just use the following code: This suggestion is to allow letters to be randomized in the pick random block.
For example,(pick random (A) to (Z) :: operators)Would select a random letter from the alphabet.(pick random (F) to (L))Would check between those, etc. This could be useful because it’s much more convenient than setting random 1-10 and “if, then else” ing for each possible result to set to a letter.
Pros:
allows easier letter randomization
Cons:
Can’t think of any
set [example v] to (item (pick random (1) to (length of [list v] )) of [list v] :: list)
(she/her) Mostly inactive nowadays. stand with ukraine.
- VeryFamus
- Scratcher
1000+ posts
Pick random (A) to (Z)
instead of using if/elses you can make a list of all possible results(works with anything, not just letters/numbers, but words too!) then just use the following code: This suggestion is to allow letters to be randomized in the pick random block.
For example,(pick random (A) to (Z) :: operators)Would select a random letter from the alphabet.(pick random (F) to (L))Would check between those, etc. This could be useful because it’s much more convenient than setting random 1-10 and “if, then else” ing for each possible result to set to a letter.
Pros:
allows easier letter randomization
Cons:
Can’t think of anyset [example v] to (item (pick random (1) to (length of [list v] )) of [list v] :: list)
Do you support? Just because there is a workaround (that may not be that simple) doesn’t justify a support/no support.
the old mythical legend has appeared
some know me as the guy who only posted in suggestions
be high contrast
Lamp oil, rope, bombs. You want it? It’s yours my friend. As long as you have enough rupies.
- CatGuyAnimates
- Scratcher
100+ posts
Pick random (A) to (Z)
it's a convientent work around, and allows for more than just what your suggesting. plus, the more things scratch adds that other languages doesn't have, the harder it is for scratch users to transfer their skills. the closest to it in python is this:instead of using if/elses you can make a list of all possible results(works with anything, not just letters/numbers, but words too!) then just use the following code: This suggestion is to allow letters to be randomized in the pick random block.
For example,(pick random (A) to (Z) :: operators)Would select a random letter from the alphabet.(pick random (F) to (L))Would check between those, etc. This could be useful because it’s much more convenient than setting random 1-10 and “if, then else” ing for each possible result to set to a letter.
Pros:
allows easier letter randomization
Cons:
Can’t think of anyset [example v] to (item (pick random (1) to (length of [list v] )) of [list v] :: list)
Do you support? Just because there is a workaround (that may not be that simple) doesn’t justify a support/no support.
var = ord(randint(0, 10)) //ord converts the number to an ascii character.
im not saying support or no support because they undermine the discussion around whether or not a feature is important. it doesnt matter if 50 people think adding (insert random feature here) is a good or bad idea. what matters is what it adds to the site that is missing and how useful it is.
(she/her) Mostly inactive nowadays. stand with ukraine.
- _bz
- Scratcher
100+ posts
Pick random (A) to (Z)
But one thing is that you should type in the list in each slot.
A
B
C
D
E
so on until z or any other character you want. Then only use this script given below which picks random numbers which is taken from the position of the list and stored into a variable. Like A is 1 and B is 2 and etc..
A
B
C
D
E
so on until z or any other character you want. Then only use this script given below which picks random numbers which is taken from the position of the list and stored into a variable. Like A is 1 and B is 2 and etc..
or instead of using if/elses you can make a list of all possible results(works with anything, not just letters/numbers, but words too!) then just use the following code:set [example v] to (item (pick random (1) to (length of [list v] )) of [list v] :: list)
set [digits v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZ]Here the 26 can be set to any value. Means like 24 is upto X
set [random digit v] to (letter (pick random (1) to (26)) of (digits))
Last edited by _bz (Dec. 10, 2021 02:50:40)
- dave-alt-4
- Scratcher
1000+ posts
Pick random (A) to (Z)
guide to make good projects <3
Think! Is saying if you support a suggestion necessary? No! People can just tell by your constructive post after it. You have more freedom on your tone!
Forumers, especially new, may also get upset if you say “no support!!!” at them! They may take the whole post in a negative tone, and that makes them upset!
Instead, you can kindly say why their suggestion has cons. They will take it as “constructive criticism” and be happy. - dertermenter
Forumers, especially new, may also get upset if you say “no support!!!” at them! They may take the whole post in a negative tone, and that makes them upset!
Instead, you can kindly say why their suggestion has cons. They will take it as “constructive criticism” and be happy. - dertermenter
- thatwasdeadsimple
- Scratcher
100+ posts
Pick random (A) to (Z)
This suggestion is to allow letters to be randomized in the pick random block.
For example,(Pick Random (a v) to (z v) :: operators)Would select a random letter from the alphabet.(Pick random (f v) to (t v) :: operators)Would check between those, etc. This could be useful because it’s much more convenient than setting random 1-10 and “if, then else” ing for each possible result to set to a letter.
Pros:
allows easier letter randomization
Cons:
Can’t think of any
Edit: letters don’t show as variables (the arrows downward are just for proper visual effect)
Do this:
set [alphabet v] to [abcdefghijklmnopqrstuvwxyz]
(letter (pick random (1) to (26)) of (alphabet))
“….the right man in the wrong place can make all the difference in the world.” - the G-Man
Check out my CS:GO map!
- Paddle2See
- Scratch Team
1000+ posts
Pick random (A) to (Z)
dupe?Thanks for the link! It does look like this is a duplicate topic so I'll close it to keep the conversation all in one place.
Please use the existing topic in the link above.
Scratch Team Member, kayak and pickleball enthusiast, cat caregiver.
This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.
(credit to Za-Chary)
;
- Discussion Forums
- » Suggestions
- » Pick random (A) to (Z)