''' Purpose: print out on the same line, the numbers 1 to r, for user-specified r ''' # get r reply = input( 'Enter an integer: ' ) r = int( reply ) # print the values in the interval 1 ... r for j in range( 1, r+1 ) : print( j , end=' ' ) print()