''' Purpose: stepping stone to nested looping ''' # get n reply = input( 'Enter number of columns: ' ) n = int( reply ) # performed repeated printing of a number series # print a line of the form row: 0 1 2 ... n-1 # to do so need to first print the row: part # then on same line print out the values 0 1 2 ... n-1 one after the other # end='...' in the print statement is an optional parameter --> look in thats_printastic.py print( 'row :', end=' ' ) # we want to print row: only once, and then the rest of the numbers # on the same line # need a for range loop to print each number from 0 to n - 1 # c for column for c in range( 0, n ): print( c, end=' ' ) # we want each number to be printed on the same line but separated by a space # when we want to end the current line print() # prints nothing --> ends the current line so the next print statement will # print on a new line print( 'all done' ) # each row is made up of columns # if we enter number of columns = 5, then that row has 5 columns which are denoted as # row: 0 1 2 3 4 --> important notation for later # this doesn't indicate the number of rows. It's just saying that for this one row, here are the column indices