Discuss Scratch

powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

How can I sense if an individual letter is lowercase or uppercase in Scratch? I know you can do this offline with the <list contains string> block, but it doesn't work in Scratch 2.0.

Last edited by powerpoint56 (May 19, 2013 11:51:47)

XdwbX
Scratcher
22 posts

Detecting if a letter is uppercase or lowercase

You could make a list of capital letters, and compare to that.



Of course, changing the 1 on the second line with a “length of” block could get you any letter of the string you wanted to check.
xlk
Scratcher
100+ posts

Detecting if a letter is uppercase or lowercase

Basically, you have a list with all the upper case letters, and check if it contains the first letter
powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

xlk wrote:

Basically, you have a list with all the upper case letters, and check if it contains the first letter
Yeah, I tried that, but it doesn't work in 2.0…
powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

XdwbX wrote:

You could make a list of capital letters, and compare to that.



Of course, changing the 1 on the second line with a “length of” block could get you any letter of the string you wanted to check.
Doesn't work with 2.0…

Last edited by powerpoint56 (May 19, 2013 15:17:51)

scratchU8
Scratcher
60 posts

Detecting if a letter is uppercase or lowercase

Well, if it doesn't work in 2.0, you can still always make and upload it with 1.4.
That is, of course, if you didn't already get so far into it that it'd take forever to start over, because I don't think there's a way to convert 2.0 into 1.4.
Ehm.
powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

scratchU8 wrote:

Well, if it doesn't work in 2.0, you can still always make and upload it with 1.4.
That is, of course, if you didn't already get so far into it that it'd take forever to start over, because I don't think there's a way to convert 2.0 into 1.4.
Ehm.
Well, I have gotten quite a long ways with it (what an understatement, powerpoint56!!!!!!!!! ). I'll make a test project on 1.4 and see if it works to post the project from 1.4 to 2.0. I predict not.
powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

Update: Nope, I tried on my test account, but once it's converted to 2.0 Flash format it isn't case-sensitive anymore.
XdwbX
Scratcher
22 posts

Detecting if a letter is uppercase or lowercase

It worked as I posted. At least, when I tested it, it did. Can you post a pic of your code?
powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

XdwbX wrote:

It worked as I posted. At least, when I tested it, it did. Can you post a pic of your code?
Try having it sense a lowercase letter as the first letter. What does it report?
XdwbX
Scratcher
22 posts

Detecting if a letter is uppercase or lowercase

You're absolutely right. The test I did earlier was flawed. Scratch sees “A” as being equal to “a”.

I'll still try to find a way to make this work. Sorry for my mistake.
powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

XdwbX wrote:

You're absolutely right. The test I did earlier was flawed. Scratch sees “A” as being equal to “a”.

I'll still try to find a way to make this work. Sorry for my mistake.
That's fine! Thanks for trying to help!
powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

bump

Is there even a way to detect if a letter is uppercase or lowercase?
BoltBait
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

powerpoint56 wrote:

How can I sense if an individual letter is lowercase or uppercase in Scratch? I know you can do this offline with the <list contains string> block, but it doesn't work in Scratch 2.0.


Here's one that works:

http://scratch.mit.edu/projects/10213040/

This is only a demo that works for A or a. But, you should be able to easily expand it to the entire alphabet.

Hope this helps.
powerpoint56
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

BoltBait wrote:

powerpoint56 wrote:

How can I sense if an individual letter is lowercase or uppercase in Scratch? I know you can do this offline with the <list contains string> block, but it doesn't work in Scratch 2.0.


Here's one that works:

http://scratch.mit.edu/projects/10213040/

This is only a demo that works for A or a. But, you should be able to easily expand it to the entire alphabet.

Hope this helps.
Thanks!
jpayer123
Scratcher
12 posts

Detecting if a letter is uppercase or lowercase

XdwbX wrote:

You could make a list of capital letters, and compare to that.



Of course, changing the 1 on the second line with a “length of” block could get you any letter of the string you wanted to check.

I would be a lot easier if they just had a block like
letter1oftest
then you could set case-sensitive on and off

Last edited by jpayer123 (July 28, 2015 20:38:19)

hedgehog125
Scratcher
100+ posts

Detecting if a letter is uppercase or lowercase

scratchU8 wrote:

Well, if it doesn't work in 2.0, you can still always make and upload it with 1.4.
That is, of course, if you didn't already get so far into it that it'd take forever to start over, because I don't think there's a way to convert 2.0 into 1.4.
Ehm.
Yes there is somone has made a converter: http://kurt.herokuapp.com/20to14
DrKat123
Scratcher
1000+ posts

Detecting if a letter is uppercase or lowercase

hedgehog125 wrote:

scratchU8 wrote:

Well, if it doesn't work in 2.0, you can still always make and upload it with 1.4.
That is, of course, if you didn't already get so far into it that it'd take forever to start over, because I don't think there's a way to convert 2.0 into 1.4.
Ehm.
Yes there is somone has made a converter: http://kurt.herokuapp.com/20to14
Please don't necropost.
cs69170
Scratcher
61 posts

Detecting if a letter is uppercase or lowercase

How can I sense if an individual letter is lowercase or uppercase in Scratch? I know you can do this offline with the <list contains string> block, but it doesn't work in Scratch 2.0.
Check out this project: https://scratch.mit.edu/projects/169828742/

PS I made it
-Mysticoder-
Scratcher
100+ posts

Detecting if a letter is uppercase or lowercase

Hi, as this issue has been resolved, I will report it to be closed.

Powered by DjangoBB