How can I advance the exercise after the infinite loop?

When I try to write an infinite loop, the program doesn’t run. Fortunately I set it back to the standard loop of 4 and it let me continue for some reason.

3 Likes

I actually can’t continue this exercise after running the infinite loop. What the heck do I do? I’ve refreshed, cleared cookies, signed out and back in, reset progress, everything. It will not let me continue this exercise

8 Likes

Yet again, another one completely broken exercise.
Initial conditions askus to append students from one list to other with temporary full list as income.
To do this, we should make this:
for student in students_period_B:
students_period_A.append(student)
print(student)

instead the:

for students in students_period_A:
students_period_B.append(students)
print(students)

2 Likes

I had the same problem! I was able to move on (after Firefox crashed, and a few refreshes) when I change the iteration variable. I.e., at first I had for s in students_period_A: ... then I changed all the instances of s to a and it could run and continue to the next step. Hope this helps!

8 Likes

There is a bug in the program.
After creating an infinite loop program stops working (as required), but neither refreshing nor trying Ctrl + C stops the loop, and then I can’t move forward (as I don’t get the checkbox ticked).

for student in students_period_A:
students_period_A.append(student)
print(student)

1 Like

Same thing happens to me. Codecademy won’t let me skip the problem too so I guess I’ll have to skip the rest of the loops section just to move on.

1 Like

In order to move forward on this lesson, you just need to run any working code. You could comment out the infinite loop, or set it back to a working loop with student_period_B then run the code. This will give you the checkmark to move forward. The last step requires the loop to be fixed with the B students, run your code again and you should be able to move forward.
Sorry this isn’t clear in the instructions, let me know if you have any suggestions to improve the wording.

15 Likes

This exercise is still not working even when I change the infinite loop to a finite loop it just doesn’t do anything when i press the “Run” button it just loads and loads …
This needs to be fixed.

okay so I found two ways to get this issue over and proceed to the next exercise.

  1. refresh the page and run the right code → ticks the q3
    and just run the code again → ticks the q4 and activates ‘the next’ button
  2. just write a wrong code and click ‘view solution’ → activates ‘the next’ button

hope it helps :slight_smile:

5 Likes

If WE READ properly, it actually has the correct instructions:

Refresh the page (or type something into your editor) to escape this infinite loop! Then, get rid of the mistake that caused the infinite loop.

3 Likes
for student in students_period_A:
  students_period_B.append(student) 
  print(student)

The code should be look like above after refreshing. after that just run the code and pass the stages.

1 Like

Thanks Man! This really helped. I had a different problem than the vast majority of people, my infinite oop step was not even running. Sadly I had to use the view solution button, but thanks for the idea. It totally flew over my head.

The view solution made it unstuck for me! Thank you!

Commenting out the infinite loop and then doing the run definitely worked

Thank you! This worked

Thanks . It worked .

I tried this. Click on Get Help>>Get Code Solution>>. You will be able to Hit ‘Next’ button to go to the next session .

This is the only thing that worked for me, tried all the other suggestions. CLick Get Help and then have it give you the solution.

Yea this worked like a dream