Task 2, wordle description

As stated by the project description

If an invalid guess is provided, the answer should be "Invalid word. Try again: ". Do not repeat the first prompt.

Does this mean that the return string should be
"Invalid word. Try again: "

or should
"Invalid word. Try again: "

be written in the console?

Moreover what does Do not repeat the first prompt. mean?

Since we need to keep iterating until we get the desired input from the user, it makes sense to use a while loop for this, inside which I use the lookup function to look for the word.

However, since both the runtime of the while loop and the lookup function depend on the input of the user, wouldn’t both of them have a linear runtime, thus giving a final quadratic runtime and violating the guidelines of the project?