''' Purpose: introduce nested looping. for a user-supplied n, loop n times where on the r-th iteration, the integers from 1 to r are printed out. ''' # get n reply = input( 'Enter number: ' ) n = int( reply ) # performed the repeated printing of a number series for r in range( 1, n + 1 ) : # print the numbers from 1 to r