Write a loop that inputs words until the user enters STOP. After each input, the program should number each entry and print in this format:
'''
Write a loop that inputs words until the user enters STOP.
After each input, the program should number each entry and print in this format:
'''
s=""
words=[]
n=1
while(s!="STOP"):
t = "Enter word no. "+str(n)+": "
s = input(t)
if(s!="STOP"):
words.append(s)
n=n+1
print("\n")
n=1
for r in words:
print("Words No. ",n,": ",r)
n=n+1
Comments
Leave a comment