Check integer or decimal

You may want to use
blocks (1)

3 Likes

well, if the user just text for example 28. without indicating something after coma, it will be shown as a decimal, while it’s not really isn’t it?

1 Like

if there is a full stop then it is not a number.

1 Like

Tested, try this
blocks (2)
It should return true we there’s nothing after “.”

3 Likes

well i think @TRICKY_MIND you have at least 2 solution :slight_smile:

1 Like

who is @TRICKY_MIND

The guy that created the subject :slight_smile:

He is OP:
image

Well, you didn’t know his name but posted the solution. O-Ok…

1 Like

… I forgot already
Edit I thought it is another guy lololloolool

2 Likes

Actully this won’t work because


I mean this

1 Like

It was my mistake :sweat_smile:

There are multiple solutions and this is one of them:
image

3 Likes

That was what I think of first but eventually I realize that you can simply use text component.
However the number shd be 1 not 0

Well tested, and it works fine for me.

How??? I quite do not understand what was your mistake…

I marked @WatermelonIce 's post as solution in confusion…

1 Like

Don’t take this away from me :sob:
jk

if number%1 != 0: DECIMAL
else: INTEGER

% = modulo of in AI2

4 Likes

What are you talking about?
My brain is crazy lol

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.