I am using Scratch to teach the programming basics to beginners. In the "operators" section, I think there should be two more: a "power" operator (maybe like the ^ used in spreadsheets) and an "int" function (to get the integer part of a number). Any opinions?
Franco - Italy
Offline
I support. Scratch has many missing blocks when it comes to Operators blocks.
Offline
Definitely. I always thought it was strange that it has trig functions and "e to the power of" and stuff, but not just plain power. I'm a little less sure about "int" (also known as
"floor") because it does have "round" which can be used for the same purpose with a little extra work (just subtract 0.5 first), but but there's certainly no harm in adding it anyway.
Last edited by ManaUser (2012-06-04 12:12:30)
Offline
You can solve exponents like this: http://wiki.scratch.mit.edu/wiki/Solving_Exponents
Offline
Offline
I agree with this because the program could be much easier to work with if we had some more blocks.
Offline
You can raise a number to another by doing one or the other. You get the same result either way.
([10 ^ v] of ((power) * ([log v] of (base)))) ([e ^ v] of ((power) * ([ln v] of (base))))
Last edited by chanmanpartyman (2012-05-28 21:57:24)
Offline
I would like a (() ^ ()) block.
Offline
I took a look at the workarounds, but I am thinking about my students: they don't know logarithms (for the next two years, at least) and I would like something simpler than that loop. "power" and "int/floor" are staples in spreadsheets and other languages, I am asked by my students why they are not there. Could use "round", though.
Offline
Well you could show them the logarithm method and just say THAT it works, you don't need to explain HOW.
Offline
I would prefer to avoid the "trust-me-you-will-learn-it-later" routine... It raises a wall, and, frankly, is not generally helpful at 13-14. Also, when they ask "it's there in Excel and Calc, why not here?", it's tough to answer. Of course, these may seem my personal considerations, but I know my kids well enough.
Offline
roijac wrote:
You could modify the source code and add that block, but that wouldn't work online
By that logic, we would only need like 3 blocks to begin with to get us started and then we could just modify the source code to get more blocks
Offline