Discuss Scratch

something_nice
Scratcher
1 post

The HwS Questions Directory

you need to use varibles
AldgatePupil16
Scratcher
7 posts

The HwS Questions Directory

Please join my Studio
Chudi Studios Unleashed

And to to
@aldgatepupil16
@redname2
@red4elephant
@extras104
Deplixed
Scratcher
45 posts

The HwS Questions Directory

The Official List of Rejected Suggestions wrote:

1.6 2D lists

2D lists, also known as 2D arrays, nested lists, or matrices, are a type of data structure that allows you to put an entire list as an element of another list; that is, it allows you to put lists inside of lists. These sorts of data structures are used widely in other programming languages and functions similarly to a table.

This block, and others, would allow you to create 2D lists to store information. However, this is too complicated for what is supposed to be an introductory programming language. There are workarounds possible by using an ordinary list and an indexing function. For those who are interested, it may be worth checking out Snap!. It is a block-based programming language designed for experienced programmers and has more advanced data structures than Scratch does.

add [] to sublist () of [list v] :: list 
View source
forkmanb
Scratcher
100+ posts

The HwS Questions Directory

TheonetruePICKLE wrote:

when green flag clicked
ask [Is this cool] and wait
this isn't the place to put blocks. please test scratchblocks here:
https://scratch.mit.edu/discuss/topic/741323/
MrInteractions
Scratcher
7 posts

The HwS Questions Directory

Sorry, this post appears to include unsuitable language and will not be posted.
Opanimator-
Scratcher
10 posts

The HwS Questions Directory

-InsanityGames-
Scratcher
500+ posts

The HwS Questions Directory

An inactive directory? Intriguing…
-InsanityGames-
Scratcher
500+ posts

The HwS Questions Directory

-InsanityGames- wrote:

(#209)
An inactive directory? Intriguing…
In all seriousness though, is it okay if I take over this directory? I already own this Bugs and Glitches directory which uses automation, and this directory hasn't been updated in over a year.
blah_blahYa
Scratcher
14 posts

The HwS Questions Directory

Can anyone help me do the following:

when green flag clicked
forever
if <(star and heart) = (clicked)> then
change [points] by((points) + (10))
end

Last edited by blah_blahYa (March 20, 2024 19:20:03)

blah_blahYa
Scratcher
14 posts

The HwS Questions Directory

when green flag clicked
set [inputExpression v] to (3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3)
initialize [outputQueue v] to []
initialize [operatorStack v] to []

repeat (length of (inputExpression))
set [currentToken v] to (letter (i) of (inputExpression))
if <(currentToken) = [a number]> then
add (currentToken) to (outputQueue)
else
if <(currentToken) = [an operator]> then
repeat until <<(operatorStack) = []> or <(currentToken) has greater precedence than (top of (operatorStack))>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
push (currentToken) onto (operatorStack)
else
if <(currentToken) = [a left parenthesis]> then
push (currentToken) onto (operatorStack)
else
if <(currentToken) = [a right parenthesis]> then
repeat until <<(operatorStack's top) = [a left parenthesis]>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
remove (operatorStack's top) // Remove the left parenthesis
end
end
end
end
end

repeat until <<(operatorStack) = []>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
define push(item v) onto(stack v)
add (item) to (stack)

define remove top from(stack v)
delete (1) of (stack)

define top of(stack v)
(item (1) of (stack))

define has greater precedence than(item1 v) (item2 v)
<((item1) has greater precedence than (item2))>

define a number
<(currentToken) = [0] or (currentToken) = [1] or (currentToken) = [2] or (currentToken) = [3] or (currentToken) = [4] or (currentToken) = [5] or (currentToken) = [6] or (currentToken) = [7] or (currentToken) = [8] or (currentToken) = [9]>

define an operator
<((currentToken) = ["+"] or (currentToken) = ["-"] or (currentToken) = ["*"] or (currentToken) = ["/"] or (currentToken) = ["^"])>

define a left parenthesis
<(currentToken) = ["("]>

define a right parenthesis
<(currentToken) = [")"]>

Last edited by blah_blahYa (March 21, 2024 21:28:52)

-InsanityGames-
Scratcher
500+ posts

The HwS Questions Directory

Deplixed wrote:

The Official List of Rejected Suggestions wrote:

1.6 2D lists

2D lists, also known as 2D arrays, nested lists, or matrices, are a type of data structure that allows you to put an entire list as an element of another list; that is, it allows you to put lists inside of lists. These sorts of data structures are used widely in other programming languages and functions similarly to a table.

This block, and others, would allow you to create 2D lists to store information. However, this is too complicated for what is supposed to be an introductory programming language. There are workarounds possible by using an ordinary list and an indexing function. For those who are interested, it may be worth checking out Snap!. It is a block-based programming language designed for experienced programmers and has more advanced data structures than Scratch does.

add [] to sublist () of [list v] :: list 
View source
Didn't expect to casually find someone using my project here lol

Last edited by -InsanityGames- (March 21, 2024 21:22:33)

DaBestCoconut
Scratcher
13 posts

The HwS Questions Directory

Please help me. I am trying to find a NON-LAGGY scrolling background for a big game I am making.
BigNate469
Scratcher
1000+ posts

The HwS Questions Directory

I've seen a couple of posts in this topic from people asking for help. That is not the point of this topic, please open your own instead. To do so, just hit “New Topic” at the top of the forum page, after exiting this topic. People aren't really looking here to help you, however they are looking in the rest of the Help with Scripts forum.
Oleksyshyn29
Scratcher
13 posts

The HwS Questions Directory

[when green flag clicked]
Oleksyshyn29
Scratcher
13 posts

The HwS Questions Directory

move () steps[scratchblocks]
turn cw () degrees
[/scratchblocks][scratchblocks]
backdrop #
[/scratchblocks]
BluePixelLOLLL
Scratcher
1000+ posts

The HwS Questions Directory

blah_blahYa wrote:

when green flag clicked
set [inputExpression v] to (3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3)
initialize [outputQueue v] to []
initialize [operatorStack v] to []

repeat (length of (inputExpression))
set [currentToken v] to (letter (i) of (inputExpression))
if <(currentToken) = [a number]> then
add (currentToken) to (outputQueue)
else
if <(currentToken) = [an operator]> then
repeat until <<(operatorStack) = []> or <(currentToken) has greater precedence than (top of (operatorStack))>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
push (currentToken) onto (operatorStack)
else
if <(currentToken) = [a left parenthesis]> then
push (currentToken) onto (operatorStack)
else
if <(currentToken) = [a right parenthesis]> then
repeat until <<(operatorStack's top) = [a left parenthesis]>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
remove (operatorStack's top) // Remove the left parenthesis
end
end
end
end
end

repeat until <<(operatorStack) = []>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
define push(item v) onto(stack v)
add (item) to (stack)

define remove top from(stack v)
delete (1) of (stack)

define top of(stack v)
(item (1) of (stack))

define has greater precedence than(item1 v) (item2 v)
<((item1) has greater precedence than (item2))>

define a number
<(currentToken) = [0] or (currentToken) = [1] or (currentToken) = [2] or (currentToken) = [3] or (currentToken) = [4] or (currentToken) = [5] or (currentToken) = [6] or (currentToken) = [7] or (currentToken) = [8] or (currentToken) = [9]>

define an operator
<((currentToken) = ["+"] or (currentToken) = ["-"] or (currentToken) = ["*"] or (currentToken) = ["/"] or (currentToken) = ["^"])>

define a left parenthesis
<(currentToken) = ["("]>

define a right parenthesis
<(currentToken) = [")"]>
when green flag clicked
set [inputExpression v] to (3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3)
initialize [outputQueue v] to []
initialize [operatorStack v] to []

repeat (length of (inputExpression))
set [currentToken v] to (letter (i) of (inputExpression))
if <(currentToken) = [a number]> then
add (currentToken) to (outputQueue)
else
if <(currentToken) = [an operator]> then
repeat until <<(operatorStack) = []> or <(currentToken) has greater precedence than (top of (operatorStack))>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
push (currentToken) onto (operatorStack)
else
if <(currentToken) = [a left parenthesis]> then
push (currentToken) onto (operatorStack)
else
if <(currentToken) = [a right parenthesis]> then
repeat until <<(operatorStack's top) = [a left parenthesis]>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
remove (operatorStack's top) // Remove the left parenthesis
end
end
end
end
end

repeat until <<(operatorStack) = []>>
add (operatorStack's top) to (outputQueue)
remove (operatorStack's top)
end
define push(item v) onto(stack v)
add (item) to (stack)

define remove top from(stack v)
delete (1) of (stack)

define top of(stack v)
(item (1) of (stack))

define has greater precedence than(item1 v) (item2 v)
<((item1) has greater precedence than (item2))>

define a number
<(currentToken) = [0] or (currentToken) = [1] or (currentToken) = [2] or (currentToken) = [3] or (currentToken) = [4] or (currentToken) = [5] or (currentToken) = [6] or (currentToken) = [7] or (currentToken) = [8] or (currentToken) = [9]>

define an operator
<((currentToken) = ["+"] or (currentToken) = ["-"] or (currentToken) = ["*"] or (currentToken) = ["/"] or (currentToken) = ["^"])>

define a left parenthesis
<(currentToken) = ["("]>

define a right parenthesis
<(currentToken) = [")"]>
huh

Last edited by BluePixelLOLLL (April 24, 2024 04:24:17)

Kingsharpblade23
Scratcher
5 posts

The HwS Questions Directory

when I receive [ v]
when I receive [ v]
when I receive [ v]
when I receive [ v]
when I receive [ v]
when I receive [ v]
when I receive [ v]
when I receive [ v]
when I receive [ v]
when I receive [ v]
MicrosoftFan2031
Scratcher
1 post

The HwS Questions Directory

S K E L E T O N


4w350m3g4m3r79
Scratcher
22 posts

The HwS Questions Directory

can i have help on a card system?
https://scratch.mit.edu/projects/1019059716/

king of page 12

Last edited by 4w350m3g4m3r79 (May 13, 2024 17:22:58)

NightGaleCoder
Scratcher
22 posts

The HwS Questions Directory

Powered by DjangoBB