0

I have written a script to prompt the user to enter values between 30 and 100. Now I want to print all the number greater than 50 in the list when the user presses the space bar. I am confused on how to go through the list and print numbers greater than 50. Can someone give me hint?

This is what I have so far:

Screenshot of Scratch script

The program works till I press space key. It doesn't run after that.

2 Answers2

1

Sorry if this was late, but it seems like you are not incrementing your index value after every iteration. Example

stonefish
  • 21
  • 2
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 16 '21 at 21:06
  • Disagree with the bot here, @stonefish points out the exact issue that's keeping the code in the example from working. – Nicolas78 Feb 10 '23 at 14:37
0

This should work:

scratch code

Replace "list" with the name of your list, and make sure to change the wait time to something more preferable.