''' Purpose: motivate the need for looping by printing out a bunch of Here I go again ''' '''print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' ) print ( 'Here I go again.' )''' # for statement starts with keyword for # then there is an index variable that gets changed # then the keyword in # finally the sequence that the index variable is counting through # here that is a range; a range is a sequence of integers # that goes from the first # to one minus the second # for i in range( 0, 3 ): print( i, 'Here I go again.') print( 'Hello' ) print( 'Its me.' ) print ( i ) print( 'Loop is over.' ) reply = input( 'Enter text: ') for ch in reply: print( ch ) print( ch ) print( 'Loop is over.' )