What is the need of count?

while count < 3: num = random.randint(1, 6) print num if num == 5: print "Sorry, you lose!" break count += 1 else: print "You win!" What is the need ofcount += 1in the code? THANK YOU


It is the upper limit for our algorithm. Once count is reached, the program stops.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.