''' Purpose: loop until we get enough inputs that add to at least 100 ''' # we don't know how many inputs it's going to take until we have a total of 100 # so we use a while loop # start with a total of 0 total = 0 # keep repeating while our total is less than 100 # a looking variable is only used when we don't know what condition to look for # here, our testing condition is whether total is less than 100, so we don't need a looking variable while ( total < 100 ): # if the total is less than 100, then we keep asking; otherwise, >= 100 --> stop asking # get another number reply = input( 'Enter number: ' ) new_number = int( reply ) # accumulate the total total = total + new_number print( 'total so far:', total ) # the while loop then checks the condition to see if it's True # if the new total is still < 100, then we keep asking for a new number # if the new total is >= 100, then we can stop asking, exit the while loop