5.5: ❗ Control Flow Challenge

Topic

5.5: ❗ Control Flow Challenge

Topic Progress:

Your challenge for this section is to find the bug in the following program. Usually, the program is supposed to print out the numbers 1-100 in order but for some reason the loop is running infinitely! Find the bug, and fix it to make the program run properly.

Hints:

  • Loops run infinitely when their condition is always True.
  • The program uses two variables, x and y to keep track of the number. If you’re stuck, you might find it useful to print these out.

@

Not recently active