import random

# enter words until 'quit'

words = []

word = input('Enter a word to save or quit:')

while word != 'quit':
    words.append(word)
    word = input('Enter a word to save or quit:')

#print(words)
# print out all the words in words using a while loop
# one on each line

##i = 0
##while i < len(words):
##    print(words[i])
##    i += 1

for word in words:
    print(word)

##for j in range(len(words)):
##    print(words[j])

print('A random word that you entered is:', random.choice(words))
