0
  • Create a list called Numbers

  • Prompt the user to enter Integer number between (30-100)numbers to the list

  • Keep asking the user to enter the numbers until he enter 0 to exit from the loop Once the user press 0 “Display a message for the user to “press a space bar” to print all numbers above 50

  • Once you print and all, then display a message said “Thank you ”

Now I have written the code, but it doesn't work after i press space bar

Click here to see image of what i have so far

PM 77-1
  • 12,933
  • 21
  • 68
  • 111

3 Answers3

0

So you forgot to increment the new variable, and that loop that says the numbers actually loops 3 times instead of 4 on a 4-item list. So here is the working code:CLICK HERE

0

Try using a if-loop instead of a wait for space key...

0

There are three errors in the code:

  1. Showing numbers should be outside repeat until answer = 0.
  2. At the beginning NewVariable must be set to 1, not 0.
  3. NewVariable must be incremented by one during showing numbers.

Here is corrected script.

enter image description here

Jerzy D.
  • 6,707
  • 2
  • 16
  • 22