''' Purpose: solve spach.py test problem ''' # get access to random value manipulation import random reply1 = input( "Enter seed (integer): " ) reply2 = input( "Enter text: " ) # set seed n = int( reply1 ) # get the int version as the seed NOT THE STRING - the question asked for the int version random.seed( n ) # determine list of words and print them words = reply2.split() print( words ) # print seven words from the word list for i in range( 0, 7 ): word = random.choice( words ) # get a random word from words print( word )