Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » A very easy solution for making exponents! (powers ^)
- cs130349
-
Scratcher
4 posts
A very easy solution for making exponents! (powers ^)
I really needed a block for exponents, and I saw that the scratch forums didn't know how to do it.
I'm here to show you all to save you the trouble.
it might not work the bigger the number, but it works pretty well for mid to small numbers. example, it can do 3^29, but starts to be wrong slowly at 3^30.
anyways, here it is!
(round(e^ of ((Ln of 3) * 29)
the “E^ of ()” and the (Ln of 3) are in the drop down (abs of ()) at the bottom of the Operators section,.
I'm not sure how to make the equation in the forum scratch blocks.
Thanks for reading! hope it helps
I'm here to show you all to save you the trouble.
it might not work the bigger the number, but it works pretty well for mid to small numbers. example, it can do 3^29, but starts to be wrong slowly at 3^30.
anyways, here it is!
(round(e^ of ((Ln of 3) * 29)
the “E^ of ()” and the (Ln of 3) are in the drop down (abs of ()) at the bottom of the Operators section,.
I'm not sure how to make the equation in the forum scratch blocks.
Thanks for reading! hope it helps
- supernavo
-
Scratcher
1000+ posts
A very easy solution for making exponents! (powers ^)
(round ([e^ v] of (([ln v] of (3)) * (29))::operators))This right?
- Spentiline
-
Scratcher
100+ posts
A very easy solution for making exponents! (powers ^)
Please don't post guides on the forums. Additionally, there are multiple scripts on the forums that show how to create exponents and logarithms.
(([ln v] of (n)) / ([ln v] of (b)))for log base b of n
- effjbv
-
Scratcher
4 posts
A very easy solution for making exponents! (powers ^)
Thx
Last edited by effjbv (Aug. 30, 2024 00:59:25)
- Kevinxad
-
Scratcher
12 posts
A very easy solution for making exponents! (powers ^)
can this do roots?
- Kevinxad
-
Scratcher
12 posts
A very easy solution for making exponents! (powers ^)
Please don't post guides on the forums. Additionally, there are multiple scripts on the forums that show how to create exponents and logarithms.can this do roots?(([ln v] of (n)) / ([ln v] of (b)))for log base b of n
- abrakaidabra
-
Scratcher
500+ posts
A very easy solution for making exponents! (powers ^)
Please don't post guides on the forums. Additionally, there are multiple scripts on the forums that show how to create exponents and logarithms.How does that work?(([ln v] of (n)) / ([ln v] of (b)))for log base b of n
- The_NameLess1
-
Scratcher
1 post
A very easy solution for making exponents! (powers ^)
You could try this for exponents
5^3 is used for the example, in which the answer is 125
5^3 is used for the example, in which the answer is 125
set [Number1] to [5]
set [Number2] to [3]
set [Result] to [Number1]
repeat (Number2)
set [Result] to ((Result) * (Number1))
end
set [Result] to ((Result) / (Number1))
Last edited by The_NameLess1 (Dec. 19, 2024 20:15:01)
- cheddargirl
-
Scratch Team
1000+ posts
A very easy solution for making exponents! (powers ^)
This seems like a guide that managed to slip notice until it got necroposted on. Please be mindful that the space is for users to ask for help - we don't want the place to get cluttered with guides, otherwise it becomes less inviting for people to request for help.with scripts here.
- Discussion Forums
- » Help with Scripts
-
» A very easy solution for making exponents! (powers ^)