Discuss Scratch
- Discussion Forums
- » Suggestions
- » Solve Block
- 5values30
-
9 posts
Solve Block
The solve block would look like this.
Here's a example of it being used.
- ThisIsTemp1
-
1000+ posts
Solve Block
What will the block even do?
Solve equations like
9x=0
ninja'd
Last edited by ThisIsTemp1 (Sept. 2, 2024 17:18:13)
- 5values30
-
9 posts
Solve Block
Basically just solve any equation in text form with addition subtraction multiplication and division also parentheses in pemdas order(really just pmdas) also idk why I put a round block in it lol.
- 5values30
-
9 posts
Solve Block
Well there's this project I'm working on and it involves randomly generated equations so that wouldn't really work. 

- Za-Chary
-
1000+ posts
Solve Block
I'm going to be really picky here, but that's what happens when a mathematician sees a mathematical suggestion.
12+25x10/3 is not an equation (there is no equals sign); it is an expression. As such, there is nothing that one can solve for — this is just something that you simplify or evaluate or compute. There are a few formatting quirks that could be fixed about your suggestion, and the wording is one of them; I'd suggest that the block be called:
Then you can do things like
so that it can compute an expression without necessarily having a variable in its input.
12+25x10/3 is not an equation (there is no equals sign); it is an expression. As such, there is nothing that one can solve for — this is just something that you simplify or evaluate or compute. There are a few formatting quirks that could be fixed about your suggestion, and the wording is one of them; I'd suggest that the block be called:
Then you can do things like
so that it can compute an expression without necessarily having a variable in its input.
- ScratchCat1038
-
1000+ posts
Solve Block
I don't think this is very practical because how often would you have some code that outputs an equation? The only use I can think of is this:
- TheCreatorOfUnTV
-
1000+ posts
Solve Block
Well, I CAN think of a use for it. For example, this: I don't think this is very practical because how often would you have some code that outputs an equation? The only use I can think of is this:
would multiply all elements in the list “list” by 3 and add 1 to the items, then say all items in the list.
Or this:
which adds all the items in the list “list” together, then says the result.
However, just basic math is barely useful for most programs, which would be better suited with string manipulation - that is, letter () of (), length () and join () () - as well as control structures - that is, if <> then {}, repeat () {} and repeat until <> {}. However, both do not seem to be offered by this suggestion - and if the block were to have control structures, then it would just be text-based coding, or the language would also have to support lambda functions, which are beyond the scope of Scratch. Snap! has this feature in the form of a grey ring, though, so you may want to look into it.
To the original poster - use someone else's calculator (with credit) if you want to make it easier, and just add random equations.
Last edited by TheCreatorOfUnTV (Sept. 8, 2024 00:30:46)
- BigNate469
-
1000+ posts
Solve Block
Why would rounding anything that is a string return anything other than (well in most programming languages it would throw a type error but in Scratch it returns a 0)? I don't support. Isn't this what the equation blocks are for? Is the difference that you just type a whole equation and it solves it? Like, if the input is 5-2 it outputs as 3? Why can't you do this?I think there's an error here. Assuming the variable in the round block is a mistake, if you told it to round “12+25x10/3”, it would answer with “95” and then it would ask “95”. Here's a example of it being used.
That aside, it would ask the equation itself (it asks “12+25x10/3”), and checks if the answer is equal to x in the equation 12 + 25 * 10 / 3 = x
Last edited by BigNate469 (Sept. 8, 2024 00:52:09)
- MillionOfficial
-
500+ posts
Solve Block
Solution Well there's this project I'm working on and it involves randomly generated equations so that wouldn't really work.
————————————————————————————————
Another use: Make Well, I CAN think of a use for it. For example, this:prodigy.
snip
Last edited by MillionOfficial (Sept. 8, 2024 03:07:17)
- BringUpYourPost
-
500+ posts
Solve Block
Solution Well there's this project I'm working on and it involves randomly generated equations so that wouldn't really work.No, because what about 2x(3+7/(2-9/(2x5)) this NOT oen of your equations.
- gem1001
-
100+ posts
Solve Block
What order of operation will it use?
BODMAS?
Or Left to Right?
Or Right to Left?
Or will you be able to choose, perhaps like this?
BODMAS?
Or Left to Right?
Or Right to Left?
Or will you be able to choose, perhaps like this?
Last edited by gem1001 (Sept. 8, 2024 10:02:53)
- 5values30
-
9 posts
Solve Block
PEMDAS Probally, Well Really PMDAS What order of operation will it use?
BODMAS?
Or Left to Right?
Or Right to Left?
Or will you be able to choose, perhaps like this?
- Paddle2See
-
1000+ posts
Solve Block
It looks like this is a duplicate topic of this one over here so I'll close it to keep the conversation all in one place.
Please use the existing topic in the link above.
Please use the existing topic in the link above.
- Discussion Forums
- » Suggestions
-
» Solve Block