How do you check if a number has a decimal?

questions
answered

#42

Go to my GT!


#43

BTW: sorry @TheAmazingJello


#44

Apologize now Apologize now Apologize now


#45

a least you got random videos to watch… heh…


#46

I sincerely apologize.


#47

me too. I 100% apologize


#48

Now go to your gts apologies accepted


#49

Thanks man.


#50

Thank you.
-GweTV out


#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?


#52

Nevermind solved it! :+1:t2:


#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.


#54

Well, Petrichor explained it very well.


#55

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


#56

um… what? ??


#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?