B. False, it doesnt only have to be applied word by word
Explanation:
Answer in the attached image...
hope it helps
i = 0
while True:
user_input = input("Please enter the next word: ")
if user_input == "STOP":
break
i += 1
print("#{}: You entered {}".format(i,user_input))
print("All done. {} words entered.".format(i))
First we set i equal to zero so that we can keep track of how many words we input.
We set while True so that its a continuous loop until a certain condition is met to break out of the loop.
user_input is set equal to whatever word the user enters.
our if statement tells us to break out of the while loop if the user inputs "STOP"
If the user does not enter STOP i is set equal to itself plus 1. This just means we add one to i for every new word entered.
Then we print whichever word is entered.
After the while loop, we print All done and the quantity of words entered.