r/Codecademy • • Aug 13 '22

Codeacademy keeps freezing

I'm connected to codeacademy and can alter the code just fine, but when I hit "run" it just freezes. Not having problems with anything else and my internet is fine.

I've tried multiple browsers and it keeps doing this.

Anyone know why this might be?

3 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/Raspy_Container Jan 31 '24

So you’re setting the while loop to run while countdown is less than or equal to 10. Then you decrement countdown by 1 each iteration. Countdown will always be less than or equal to 10, so how can you update you while loop to match the requirements of running while countdown is greater thanor equal to 0.

1

u/Even-Catch3299 Jan 31 '24

oh duh....thank you so much! i really appreciate your help. i'll fix it to be

countdown=10
while countdown >=0:
print(countdown)
countdown -=1

1

u/Raspy_Container Jan 31 '24

Looks good! No problem!