Discuss Scratch

llohmar21
Scratcher
5 posts

What do round () and () mod ()

Can you guys tell me what
round
and
mod
mean
drmcw
Scratcher
1000+ posts

What do round () and () mod ()

round will round a number to it's nearest integer. .5 should round up (away from 0) Similar operators are celing and floor which always round up or down respectively. mod gives you the remainder after one number is divided by the other.
KermitMC
Scratcher
100+ posts

What do round () and () mod ()

round4.7
This would give an output of 5
because 4.7 is greater than 4.4
round4.2
This would give an output of 4
because 4.2 is less than 4.5
8mod3
This would give you an output of 2
because 8/3 = 2r2, this gives an output of what's after the “r”

Powered by DjangoBB