Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » How to use Operators
- Charmind
-
500+ posts
How to use Operators
go to guestions about scratch
1. i don't know
2. if you hawe 1.11 it will make 1
3. position ?/ color of other sprite
1. i don't know
2. if you hawe 1.11 it will make 1
3. position ?/ color of other sprite
- Asymptoteles
-
29 posts
How to use Operators
What do you do with these?
The first one is the “modulo” operation, or in other words: the “remainder of a division”.
Not sure about your mathematical background, so here's a short explanation:
Think, you want to share 6 apples among 4 people. 6 cannot be nicely dived by 4.
You can give out 1 apple to each, then you have 2 left. That's what the mod operator
calculates: 6 mod 4 is 2 . It's what remains, after having given each person the same
largest possible number of whole apples.
The division “() / ()” in Scratch is not limited to giving out whole numbers. If you
calculate 6 / 4, you'll get 1.5, which means each person gets one and a half apple.
To find out how many complete apples each one can get, you need to use the function
“floor” (in the same drop-down list as “round”).
I hope that helped.
If you use “round” instead of “floor” here, then you'd give each one 2 apples, that makes in total 8, which you didn't even have :-)
The
is just the block where you can pick one of a couple of functions. You'll eventually learn at school what functions like “sin”, “cos”,… do.
- BlueSkyGuy
-
7 posts
How to use Operators
The problem with saying that I'll learn at school what “sin” and “cos” do is that I'm homeschooled…What do you do with these?
The first one is the “modulo” operation, or in other words: the “remainder of a division”.
Not sure about your mathematical background, so here's a short explanation:
Think, you want to share 6 apples among 4 people. 6 cannot be nicely dived by 4.
You can give out 1 apple to each, then you have 2 left. That's what the mod operator
calculates: 6 mod 4 is 2 . It's what remains, after having given each person the same
largest possible number of whole apples.
The division “() / ()” in Scratch is not limited to giving out whole numbers. If you
calculate 6 / 4, you'll get 1.5, which means each person gets one and a half apple.
To find out how many complete apples each one can get, you need to use the function
“floor” (in the same drop-down list as “round”).
I hope that helped.
If you use “round” instead of “floor” here, then you'd give each one 2 apples, that makes in total 8, which you didn't even have :-)
Theis just the block where you can pick one of a couple of functions. You'll eventually learn at school what functions like “sin”, “cos”,… do.
- flamingswordTEST
-
6 posts
How to use Operators
If in doubt, always check the Scratch Wiki first I need help with operators!
http://wiki.scratch.mit.edu/wiki/Operator_Block should give you everything you need t know.
- Paddle2See
-
1000+ posts
How to use Operators
Since this topic hasn't seen a new post from the topic owner in a long time, I'm going to assume that it is dead and close the topic. If it still is alive, the topic owner just needs to use the Report button to ask a mod to reopen it 

- Discussion Forums
- » Questions about Scratch
-
» How to use Operators