Respuesta :
In python 3:
i = 0
while True:
word = input("Please enter the next word: ")
if word == "STOP":
break
i += 1
print("#{}: You entered {}".format(i, word))
print("All done. {} word(s) entered.".format(i))
I hope this helps!
The program is an illustration of loops.
Loops are used to perform repetitive operations.
The program in Python, where comments are used to explain each line is as follows:
#This gets input for the first word
word = input("Please enter the next word: ")
#This initializes count to 0
count = 0
#The following iteration is repeated until the user enters "STOP"
while word != "STOP":
#This prints the word entered
print("You entered",word)
#This increments count by 1
count += 1
#This gets input for the next words
word = input("Please enter the next word: ")
#This prints the count of all words
print("All",count,"words entered!")
At the end of the program, the number of valid inputs is printed.
Read more about similar programs at:
https://brainly.com/question/18283451