''' Purpose: prints a requested phrase a requested number of times ''' # get string of interest and the number of times it is to be printed s = input( "Enter string to be printed: " ) n = input( "Enter number of times to be printed: " ) n = int( n ) # use for loop with the `range()` function for occurrence in range( 0, n ) : print( s )