Nested while loop issue

0 Matthew Swart · September 13, 2015
Hi Guys

If I make a nested while loop I get an issue where the first run through it does both loops once that is complete it only does the first loop there after. Am I missing the point or have I done something wrong?


buttcrack = 5
x = 0

while buttcrack < 10:
print(buttcrack)
buttcrack += 0.1

while x < 200000:
x += 1
print(x)

Post a Reply

Replies

Oldest  Newest  Rating
0 Matthew Swart · September 13, 2015
Ahhh cheers mate I am a numpty I need to reset x to 0. Knew I was missing something.
  • 1

Python

106,993 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator