How do you check if a number has a decimal?



Go to my GT!


BTW: sorry @TheAmazingJello


Apologize now Apologize now Apologize now


a least you got random videos to watch… heh…


I sincerely apologize.


me too. I 100% apologize


Now go to your gts apologies accepted


Thanks man.


Thank you.
-GweTV out


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?


Nevermind solved it! :+1:t2:


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.


Well, Petrichor explained it very well.


Got it. Let’s hope people don’t hate us.


um… what? ??


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?