Discuss Scratch

convoluto-
Scratcher
100+ posts

Exponent block

Iditaroid wrote:

RalphMath wrote:

Please, please, please add this as an operator just like +-*/ it's a real limitation when teaching a lot of math concepts not to have exponentiation.
I know this is technically necroposting but you raise a good point! An exponent block would certainly make things easier for teachers working with Scratch!
You can't necropost in the suggestion forums.

Expert memelord in the making.
So far, I've made: 3 memes! ( in photoshop )

You cannot trust any of my posts because I am dumb. Some may be right, though.
Loquat + kumquat protector: - Bob
Botcho_Otkho
Scratcher
1000+ posts

Exponent block

ronsid wrote:

Support
(() ^ ()::operators)
Reasons?

This is a signature, meaning this automatically appears under my posts. (This is for people who may be confused about this)
Freddie Mercury lover <3 <3 <3 - Wiki editor - Catholic - Forum Helper - Italian - 14 years old - Sagittarius - I use Windows 7 Ultimate and Google Chrome - Guitar, Stranger Things <3 <3 - I often forget things :P
hailstone-sequence
New to Scratch
61 posts

Exponent block

Botcho_Otkho wrote:

Shushport! If there is a workaround, it's super-duper-mega long and it's annoying to have a total of 34 blocks for just one reporter.
() ^ ()::operators reporter
Try

Charles12310 wrote:

([10^ v] of ((exponent) * ([log v] of (number) :: operators )) :: operators )
It is only 5 blocks.

▀▄ ▀▄ ▀▄ ▀▄ ▀▄ ▀▄ A simple workaround is a valid reason to not support a suggestion. ▄▀ ▄▀ ▄▀ ▄▀ ▄▀ ▄▀

say ( last [thing I said v] :: looks)

think ( last [thing I thought v] :: looks)
"I think it'd be handy to have some way to disable dragging while in editor mode…" -TheLogFather

Is this gone 4evr?

▄▀ ▄▀ ▄▀ ▄▀ ▄▀ ▄▀
▄▀ ▄▀ ▄▀ ▄▀ ▄▀ ▄▀
Happysoul05
Scratcher
100+ posts

Exponent block

No support.

Not many scratchers use this.
If they use they will only go to 1,2,3,4,5 but will not try 1.5 or 125.

There is a long workaround and

Charles12310 wrote:

([10^ v] of ((exponent) * ([log v] of (number) :: operators )) :: operators )

USE THIS!
ACE009
Scratcher
100+ posts

Exponent block

hailstone-sequence wrote:

~snip~
Try

Charles12310 wrote:

([10^ v] of ((exponent) * ([log v] of (number) :: operators )) :: operators )
It is only 5 blocks.
The problem with that is that you can’t get exact results because of the values being cut off mid calculation, resulting in things like 2^6=63.999999999995. Thus, I support.

Last edited by ACE009 (May 30, 2018 11:07:05)


when this signature read :: events hat
if <I know what [kumquats] are :: sensing> then //false
have (Katty :: pen) [eat v] [nearby kumquats v] :: motion // Katty eats the kumquats for me, whatever they are
else
learn what [kumquats] are :: sensing // this block must be malfunctional
end
----WindowsXD-----
Scratcher
82 posts

Exponent block

(5^7)
report ()

when I receive [ scratch fourms
tell.
solve.
know.
My browser / operating system: Windows NT 10.0 (2015), Chrome 65.0.3325.181, Flash 30.0 (release 0) my processer: HP (Hewlett Packard)
Gimme A Free Internet If You Want!
please give me one,i'm VERY poor and no one cares
thelostgames
Scratcher
58 posts

Exponent block

define (number) to the power of (exponent)
set [num v] to (number)
repeat (exponent)
set [num v] to ((num) * (num))
end

This should work

Last edited by thelostgames (Sept. 15, 2018 00:19:18)


No form of coding is right or wrong, they are all simply ways of developing your brain to reach new levels.

Find me here: HERE!
Botcho_Otkho
Scratcher
1000+ posts

Exponent block

thelostgames wrote:

define (number) to the power of (exponent)
set [num v] to (number)
repeat (exponent)
set [num v] to ((num) * (num))
end

This should work
Not when the number ia negative or decimal.

This is a signature, meaning this automatically appears under my posts. (This is for people who may be confused about this)
Freddie Mercury lover <3 <3 <3 - Wiki editor - Catholic - Forum Helper - Italian - 14 years old - Sagittarius - I use Windows 7 Ultimate and Google Chrome - Guitar, Stranger Things <3 <3 - I often forget things :P
badatprogrammingibe
Scratcher
500+ posts

Exponent block

space_elephant
Scratcher
100+ posts

Exponent block

support, though there is a workaround.
define (base)^(exponent)::reporter
if<(base)<[0]>::control
if<((exponent)mod(1))=[0]>::control
if<((exponent)mod(2))=[0]>::control
return([e ^ v]of((exponent)*([ln v]of(()-(base)))))::#000 cap
else
return(()-([e ^ v]of((exponent)*([ln v]of(()-(base))))))::#000 cap
end
else
return[NaN]::#000 cap//it is complex
end
else
return([e ^ v]of((exponent)*([ln v]of(base))))::#000 cap
end

red link
[url=redlink.com][color=red][u]red link[/u][/color][/url]
space_elephant
Scratcher
100+ posts

Exponent block

mitchboy wrote:

kayybee wrote:

The short version works for all real numbers, the long one doesn't.
Actually, 3.14 ^ 3.14 results in 30.959 on my custom block (about seven posts above). Try it. It just doesn't work with negative numbers or fractions. And my project barely involves any heavy scripting or math at all. All you need is:
- three variables
- a repeat block
- a subtraction and a multiplication block
- a set variable block

That's it. It took me like two minutes.

3.14 ^ 3.14 = 36.33783888017471

you got 3.14 ^ 3 = 30.959144000000002

Cyoce wrote:

Support
((0) ^ (0) :: operators)[/quote]

Not a good example. Most languages answer one.

Support suggestion.

red link
[url=redlink.com][color=red][u]red link[/u][/color][/url]
TheGreenFlash
New to Scratch
2 posts

Exponent block

I believe this block would be helpful because it could be used in many projects that use physics simulators, 3D, and other things with a lot of math, there is no easy or efficient workaround, especially when using decimals, and Scratchers who don't know about exponents might play around with and learn about them.
For these reasons, I support and hope that the Scratch Team decides to add the Exponential Operator Block to Scratch.
noogai34
Scratcher
44 posts

Exponent block

Turn Left (0 ^ 0) radians:: motion
Still thinking about it

Last edited by noogai34 (April 28, 2019 18:53:40)


when I receive [KUMQUAT INBOUND!! v]
[yeet v] all [inbound kumquats v] [out of this arena v]:: motion
SENTENCE BUILDER TIME!!!!!
([Hello! v] [Wait... v] [WHY ISN'T THIS 3.0!?!?!?!??! v] [WHY IS THIS STILL 2.0!?!?!?!? v] [WE'VE WAITED LONG ENOUGH! v] :: operators)
Not a hate letter.
noogai34
Scratcher
44 posts

Exponent block

define (base) ^ (exponent):: reporter
set [variable v] to (base:: custom - arg)
repeat (exponent:: custom - arg)
change [variable v] by ((base) * (base))
end
No support, the above code is a workaround
But it would still be handy in the education industry!

Last edited by noogai34 (April 28, 2019 21:42:47)


when I receive [KUMQUAT INBOUND!! v]
[yeet v] all [inbound kumquats v] [out of this arena v]:: motion
SENTENCE BUILDER TIME!!!!!
([Hello! v] [Wait... v] [WHY ISN'T THIS 3.0!?!?!?!??! v] [WHY IS THIS STILL 2.0!?!?!?!? v] [WE'VE WAITED LONG ENOUGH! v] :: operators)
Not a hate letter.
imfh
Scratcher
1000+ posts

Exponent block

Support, workarounds are less precise and more costly than this could be. It shouldn't be difficult to implement either. The only downside that I could think of is that it might be confusing to some Scratchers or seem too advanced.

noogai34 wrote:

define (base) ^ (exponent):: reporter
set [variable v] to (base:: custom - arg)
repeat (exponent:: custom - arg)
change [variable v] by ((base) * (base))
end
No support, the above code is a workaround
But it would still be handy in the education industry!
That solution works if you only need to work with small powers, but not if you want to do many large ones and quickly. The point of adding it is so there is no need to use a workaround.

when signature read:: events hat
say [Not much here...] for (2) secs
VFDan
Scratcher
100+ posts

Exponent block

I support per the reasons in @imfh's post.

My signature will never be eaten by an evi -This signature was eaten by an evil kumquat.
LEGAMER4665
Scratcher
54 posts

Exponent block

set [a v] to (answer)
repeat (a)
set [b v] to ((b) * (a))
end

The camera opens on text that says, “Hi.” As the NARRATOR continues to speak, we're shown a globe from Google Earth.

NARRATOR: Hi, you're on a rock floating in space. Pretty cool, huh? Some of it's water. *beep* it, actually, most of it's water. I can't even get from here to there without buying a boat.

A plane is shown flying from South America to Africa. The plane fades off the screen, and a lone, sad stick figure is shown standing on Africa.

NARRATOR: It's sad. I'm sad. I miss you.

The camera pans left across the globe to show more sad stick figures also standing on South America, North America, and Europe.

CHORUS: How did this happen?

NARRATOR: A long time ago- Actually, never, and also now, nothing is nowhere. When? Never. Makes sense, right? Like I said, it didn't happen. Nothing was never anywhere. That's why it's been everywhere. It's been so everywhere, you don't need a where. You don't even need a when. That's how “every” it gets.

A long pause happens.

NARRATOR: Forget this. I wanna be something. Go somewhere. Do something. I want things to change. I want to invent time and space, and I know it's possible because everything is here, and it probably already happened. I just don't know when to start, and that's exactly where it started.

The sound of VCR fast forwarding plays.

NARRATOR: Ooh, I paused it. I think there's a universe now. What's it made of?

CHORUS: Quarks and stuff!

NARRATOR: Ah, that's a thing, in a place. Don't like it? Try a new place, at a different time. Try to stick together because the world is gonna get bigger and emptier, but it's not empty yet. It's still very full and about a kjghpillion degrees.
15-MinuteGaming
Scratcher
100+ posts

Exponent block

Support. They have logarithms but no exponents.

My kumquats and forum signatures ate each other. Luckily, I did not like any of them anyways.
The evil kumquat must have some relation with thanos cat. Evil kumquat is 2.0 and thanos cat is 3.0
April 1st is this Saturday. Details here.
space_elephant
Scratcher
100+ posts

Exponent block

15-MinuteGaming wrote:

Support. They have logarithms but no exponents.
They don't (but should) have logarithms (except for base e and 10 where they also have exponents)

red link
[url=redlink.com][color=red][u]red link[/u][/color][/url]
noogai34
Scratcher
44 posts

Exponent block

No support. In Snap! the workaround is…
Script bars (result)
Set result to base
Repeat ((exponent)-(1))
Set result to result * result
End
Report result
result
Yes I was l a a y

when I receive [KUMQUAT INBOUND!! v]
[yeet v] all [inbound kumquats v] [out of this arena v]:: motion
SENTENCE BUILDER TIME!!!!!
([Hello! v] [Wait... v] [WHY ISN'T THIS 3.0!?!?!?!??! v] [WHY IS THIS STILL 2.0!?!?!?!? v] [WE'VE WAITED LONG ENOUGH! v] :: operators)
Not a hate letter.

Powered by DjangoBB

Standard | Mobile