You’re close, but not quite there.
- Initialize the
Entryvariable so that thewhileloop can test it. - Move the
inputso that it’s the first operation of thewhileloop, then test forEXIT. - Set up a
if/elif/elsebranch routine (inside of thewhileloop), so that you have three tests. Hint: the first test will be forEXIT, then for a word in your dictionary, then for everything else, which will loop back unless we have anEXITcondition.
I’ve left out some detail here, so that you will fall over it and learn more by figuring it out, but if you’d rather have a complete solution, simply say as much.
The so-called Walrus operator that @vainaixr has suggested is one way, but, as a beginner, I would suggest that you acknowledge the existence of that operator, while at the same time avoid using it for now: it’s a relatively new operator, not widely used and not available with Python versions below 3.8
It’s a shame that you didn’t continue with your flights / connections project…
… as you would have had to have learned these kind of tests and loops, while developing that, still never mind.
edit done for a correction.