Discuss Scratch
- Leadrien2366
-
100+ posts
Rename the mod block.
Right click it and click help, it explains it well enough. No support to rename.
- Ninkancho
-
500+ posts
Rename the mod block.
No support. Modulus is an actual function in programming, so having a mod block is the most elegant solution possible for having modulo functionality.
It's also important to remember that modulo and remainders are not the same thing. For two positive values, they are always the same, but modulating(?) negative numbers will still roll them over into the range specified.
Here's a demonstration, assuming a hypothetical “rem” block. (In Scratch, this block could probably be workarounded by subtracting a rounded instance of the same division, then multiplying the whole thing by the divisor again or something, but for simplicity's sake I'm just making up a “rem” reporter.) Comments represent returns, like if you were to click the blocks with those values inserted.
It's also important to remember that modulo and remainders are not the same thing. For two positive values, they are always the same, but modulating(?) negative numbers will still roll them over into the range specified.
Here's a demonstration, assuming a hypothetical “rem” block. (In Scratch, this block could probably be workarounded by subtracting a rounded instance of the same division, then multiplying the whole thing by the divisor again or something, but for simplicity's sake I'm just making up a “rem” reporter.) Comments represent returns, like if you were to click the blocks with those values inserted.
((-21) mod (4))//3As you can see, we've ended up with two completely different results, 3 and -1. So this proposed “remainder” renaming will not technically work. And since Scratch is a programming language, technicalities are very. very. important.
((-21) rem (4)::operators)//-1
Ninkancho STUDIO • ☁️ Cloud Clicker DEMO
Let's Play Together • Another Rather Unremarkable Platformer • Sinewarper
public class Scrape{public static void main(String[] args){Scrape myScrape=new Scrape();myScrape.eternally{myScrape.picture();myScrape.write();myScrape.tell();}}}
Windows NT 10.0, Chrome 51.0.2704.79, Flash 23.0 (release 0)), Flash 23.0 (release 0)
kajquats;
- Sheep_maker
-
1000+ posts
Rename the mod block.
Support for:
(() % ()::operators) //you should be able to right-click switch between the operatorsThere should be a new language in the language dropdown that changes lists to “arrays” and “mod” to “%” etc.
Last edited by Sheep_maker (March 18, 2016 00:12:32)
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- alexphan
-
1000+ posts
Rename the mod block.
Please give a reason as to why you support. support
Support, some people might think of mod as a “modification” like Minecraft mods. Maybe the ST can add its actual name on the block's “help” menu?
- A-no-meep
-
100+ posts
Rename the mod block.
I would be okay with the block being expanded into “modulo” to make it easier to read. % sign as an operator might confuse people into thinking it does something with percentages, and the remainder function is different than the modulo function. I would rather it stay the same, to minimize space used and help code be less messy.
I would like being able to use right click to change a mod into the other functions. Support for that.
I would like being able to use right click to change a mod into the other functions. Support for that.
Last edited by A-no-meep (March 24, 2016 14:10:41)
[ v]A dropdown to nowhere
- superben100
-
1000+ posts
Rename the mod block.
Support!
Hello there!
I've been a Scratcher for nine years now, and I'm always happy to help!
I'm not around too often, but I check in here from time to time.
Let me know if you need anything!
|| Probably vibing to “Try” - Lawrence ||
I've been a Scratcher for nine years now, and I'm always happy to help!
I'm not around too often, but I check in here from time to time.
Let me know if you need anything!
|| Probably vibing to “Try” - Lawrence ||
- Jonathan50
-
1000+ posts
Rename the mod block.
Wait, what? I wrote that? No support.
Anyway, this is much better. Support!
Not yet a Knight of the Mu Calculus.
- WindOctahedron
-
1000+ posts
Rename the mod block.
Support. More children (to whom Scratch is targeted) understand “remainder of X divided by Y” better than “X mod Y”. It's not too long, and intuitive (which is Scratch supposed to be).
And to those who say “it's a basic math function, no support”, I'll tell you that by the time someone moves on to more advanced languages, they are (most likely) taught about the meaning of “modulo” in school, so they won't be confused when they move on.
Oh, and don't forget that the Help tool is gone now.
And to those who say “it's a basic math function, no support”, I'll tell you that by the time someone moves on to more advanced languages, they are (most likely) taught about the meaning of “modulo” in school, so they won't be confused when they move on.
Arrays and lists are different things, too, and “lists” in Scratch are actually arrays. It's also important to remember that modulo and remainders are not the same thing. […]
Oh, and don't forget that the Help tool is gone now.
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- Maximouse
-
1000+ posts
Rename the mod block.
lists are different then arrays.In Scratch, “arrays” are called “lists,” even though most programming languages call them “arrays.” A beginner is more likely to understand “list” than “array.” Why can't mod be renamed? no support.
modulus is a main function in programming. if you don't know what it means, you can just right click it, and click help
when you set arrays, you have to set them to only have a certain amount of variables
lists can have infinite
In programming lists and arrays are the same thing. In JavaScript arrays can have any number of items.
Also, no support. I hate blocks with long labels because they make complex formulas much longer.
Last edited by Maximouse (March 3, 2020 12:38:36)
- Jonathan50
-
1000+ posts
Rename the mod block.
The terms “remainder operation” and “modulo operation” don't really denote different operations, but for that it happens that programming languages choose to use the former name for the operation for the remainder supposing truncated division (the quotient is rounded towards zero and the remainder has the sign of the dividend,) and the latter supposing floored division (the quotient is rounded down and the remainder has the sign of the divisor — like in Scratch.)
Neither of these are the answers usually given in maths, which are those given by Euclidean division, so the remainder is always non-negative, according to Wikipedia. See here.
(Also, the remainder (%) operator in Java, JavaScript, etc. gives the answer with the sign of the dividend, unlike the mod block. And in maths “%” means “percent,” not “modulo.”)
Neither of these are the answers usually given in maths, which are those given by Euclidean division, so the remainder is always non-negative, according to Wikipedia. See here.
(Also, the remainder (%) operator in Java, JavaScript, etc. gives the answer with the sign of the dividend, unlike the mod block. And in maths “%” means “percent,” not “modulo.”)
Last edited by Jonathan50 (Feb. 26, 2021 23:07:39)
Not yet a Knight of the Mu Calculus.
- Mast3rGenius
-
100+ posts
Rename the mod block.
Support based on the Scratch audience. More people would use this block as well if this happened.
Forum Helper | Scratch On! | >>>Dungeoneer<<<
- Maximouse
-
1000+ posts
Rename the mod block.
I still do, but the only reason I understood what this block does and was able to use it when I was new to Scratch is because it's called remainder in the Slovenian translation of Scratch 1.4. I think this change would make this extremely useful block available to new users. Also, no support. I hate blocks with long labels because they make complex formulas much longer.
- Rendangbike2
-
1000+ posts
Rename the mod block.
Support! This thread made me realize what the mod block works, I had no idea that it was modulo.
![](https://assets.scratch.mit.edu/get_image/.%2E/4c9f081c031ebb533f21a99756319703.gif)
![](https://assets.scratch.mit.edu/get_image/.%2E/da8f9649f7cfe1d5286deeb2bbd9339b.gif)
- Scratchperson1000000
-
500+ posts
Rename the mod block.
In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another. Given two positive numbers a and n, a modulo n is the remainder of the Euclidean division of a by n, where a is the dividend and n is the divisor.
So basically, 11 modulo 4 AKA 11 % 4 is 3. Let's try renaming it to something kid-friendly. Let's try
So basically, 11 modulo 4 AKA 11 % 4 is 3. Let's try renaming it to something kid-friendly. Let's try
[] of []% :: operatorsand then a “help” option for the block that says “In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another. Given two positive numbers a and n, a modulo n is the remainder of the Euclidean division of a by n, where a is the dividend and n is the divisor.”
DJHNVLKJUDHFIUYHDLKUHDKLFJUYGDKJFGDHMFGMDBKJSDBCKSNICUNDCHICUGUYDSGFUHGADJFIEUGAFKJ
- Maximouse
-
1000+ posts
Rename the mod block.
If it requires help, it isn't kid-friendly. Let's try renaming it to something kid-friendly. Let's try[] of []% :: operatorsand then a “help” option for the block that says “In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another. Given two positive numbers a and n, a modulo n is the remainder of the Euclidean division of a by n, where a is the dividend and n is the divisor.”