This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-10-02 08:32:13

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

"mod" block

what does it do?

I know that in the experimental viewer it's replaced with "%", but it doesn't seem to have anything to do with percentages (which I need)


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#2 2010-10-02 08:35:20

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: "mod" block

It shows the remainder of a division.

So, it divides the first number by the second number and reports the remainder. Unfortunately, percentages have little to do with it.

Offline

 

#3 2010-10-02 08:47:40

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: "mod" block

coolstuff wrote:

It shows the remainder of a division.

So, it divides the first number by the second number and reports the remainder. Unfortunately, percentages have little to do with it.

Yeah, I think I've heard that before. Oh well. Back to my percentage script.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#4 2010-10-02 08:50:07

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: "mod" block

ScratchReallyROCKS wrote:

coolstuff wrote:

It shows the remainder of a division.

So, it divides the first number by the second number and reports the remainder. Unfortunately, percentages have little to do with it.

Yeah, I think I've heard that before. Oh well. Back to my percentage script.

If you need help with that, I'd be happy to fashion a script for you. What are you looking for?

Offline

 

#5 2010-10-02 08:57:59

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: "mod" block

coolstuff wrote:

ScratchReallyROCKS wrote:

coolstuff wrote:

It shows the remainder of a division.

So, it divides the first number by the second number and reports the remainder. Unfortunately, percentages have little to do with it.

Yeah, I think I've heard that before. Oh well. Back to my percentage script.

If you need help with that, I'd be happy to fashion a script for you. What are you looking for?

No, I've already made a script for what I need. Thanks anyway!


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#6 2010-10-02 09:09:55

johndo77
Scratcher
Registered: 2010-07-30
Posts: 1000+

Re: "mod" block

It is short for modulus, coolstuff already explained, but it turns to a % sign because that's the sign used in c++ and javascript.


Crizapples

Offline

 

#7 2010-10-02 09:53:09

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: "mod" block

You've already gotten a few answers, but here is the wiki article for the block. It contains some possible uses as well.


http://i48.tinypic.com/2z5pqad.png

Offline

 

#8 2010-10-02 11:57:22

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: "mod" block

scmb1 wrote:

You've already gotten a few answers, but here is the wiki article for the block. It contains some possible uses as well.

Yeah, I posted this right before I thought about looking at the wiki.

Okay, this can be closed now.  smile


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#9 2010-10-02 12:02:34

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: "mod" block

ScratchReallyROCKS wrote:

Okay, this can be closed now.  smile

Sure thing  smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

Board footer