Discuss Scratch
- Discussion Forums
- » Suggestions
- » Add Parenthesis to the operators section
- Gameknight666
-
3 posts
Add Parenthesis to the operators section
Hi Scratchers and Scratch Team,
I'm @Gameknight666, and I'd like Scratch to have parenthesis in the operators section of code. I want this because I want Scratch to be able to solve equations that have to do with the order of operations.
I'd really like to have it!
Regards,
Gameknight
I'm @Gameknight666, and I'd like Scratch to have parenthesis in the operators section of code. I want this because I want Scratch to be able to solve equations that have to do with the order of operations.
I'd really like to have it!
Regards,
Gameknight
- ChocolatePi
-
1000+ posts
Add Parenthesis to the operators section
You can already do this with what we have!
The equivalent of
in blocks is
Think of each block as having parenthesis around it
The equivalent of
( 1 + 2 ) * 3
in blocks is
Think of each block as having parenthesis around it

- rpbourret
-
1 post
Add Parenthesis to the operators section
It would be really helpful if parentheses were actually drawn on the ends of the lozenges in the Operators section. Once you nest operators deeply enough, it's really hard to see how they fit together.
– Ron
– Ron
- JJ_Cuber
-
2 posts
Add Parenthesis to the operators section
I also agree on that, because of the equation √(XX - XY)² + (YX - YY)² (AKA the equation for solving distance) (because I was working on a game and it needed the calculation of distance,) so that would be very helpful and useful!
- Solmux
-
100+ posts
Add Parenthesis to the operators section
It would be really helpful if parentheses were actually drawn on the ends of the lozenges in the Operators section. Once you nest operators deeply enough, it's really hard to see how they fit together.
– Ron
Please post your suggestions in a separate topic.
i think
Also,
- Pixelguy1087
-
4 posts
Add Parenthesis to the operators section
Ikr, its so cool! You can already do this with what we have!
The equivalent of( 1 + 2 ) * 3
in blocks is
Think of each block as having parenthesis around it
- badatprogrammingibe
-
500+ posts
Add Parenthesis to the operators section
I agree.Ikr, its so cool! You can already do this with what we have!
The equivalent of( 1 + 2 ) * 3
in blocks is
Think of each block as having parenthesis around it
- XayCraft360
-
100+ posts
Add Parenthesis to the operators section
No support, you could just put different reporters together, because the OoO doesn't actually exist in scratch, and a reporter in another reporter gives the value of the first reporter with the second reporter
- Sigton
-
1000+ posts
Add Parenthesis to the operators section
Well I'd say the that Order of Operations is much more explicit in Scratch than in other uses. Say if I asked you to calculate 1 + 2 * 3, then you implicitly apply the order of operations and do 2*3 first. However, in Scratch EVERYTHING has brackets around it, effectively, so it is nice and easy to see and manipulate the order of operations. No support, you could just put different reporters together, because the OoO doesn't actually exist in scratch, and a reporter in another reporter gives the value of the first reporter with the second reporter
Sigton
- space_elephant
-
500+ posts
Add Parenthesis to the operators section
toch uses this:
1 + 2 * 3 // returns 7
in blocks is
( 1 + 2 ) * 3 // returns 9
is required for
1 + 2 * 3 // returns 7
in blocks is
but
( 1 + 2 ) * 3 // returns 9
is required for
as you can see, the scratch blocks have brackets in all cases, not just where they are required.
Last edited by space_elephant (Nov. 19, 2018 16:37:03)
- space_elephant
-
500+ posts
Add Parenthesis to the operators section
when green flag clicked
clear
pen down
set times to 0
delete all of x pos
repeat until mouse down? and touching mouse-pointer
move 2 steps
turn right 2 degrees
say join “I am at ” y position
change times by 1
if pick random 0 to 1 = 1 then
add x position to x pos
end
end
pen up
play sound “meow” until done
forever
go to x // without screen refresh
wait 1 secs // to enable the user to see each one clearly
end
define-atomic go to x
go to x: item random of x pos y: item random of x pos
point in direction pick random -179 to 180
repeat until touching edge
change y by -1
end
- space_elephant
-
500+ posts
Add Parenthesis to the operators section
did you want to show the brackets on the blocks?
- Discussion Forums
- » Suggestions
-
» Add Parenthesis to the operators section