Go to my GT!

# How do you check if a number has a decimal?

**MyPizza**#51

Hey, I have a similar question that I might just ask here instead of making another topic. How do I check if a number is odd or even?

**Petrichor**#53

You would use modulo. What number can all even numbers be divided by with no remainder? Since modulo gives you the remainder after a division (so 100%2 = 0, 101%2 = 1) you can use this code, which will be zero if the number is equal to two.

So if we put this code into a check once if, if the remainder is 0, it is even. If it is 1, it will be odd.

This code checks if a number is even or odd then shows the answer.

Hope this helps.

**William04GamerA**#57

It seems like the question already has been solved. But I got an idea and I think that I know how to recreate it in Hopscotch. Maybe an application that checks **how many** decimals a number has?