Hi,
I got the following questions as part of a basic interview test and was wondering with the second question where I'm going wrong.
Here are the questions:
QST 1: Write a function to print out user entry?
ANSWER:
QST 2: Write a function to continuously loop through the user-entered text and upon entry of “exit” by user the infinite loop exits?
ANSWER:
Basically I've got the following issues:
1 - The while loop doesnt seem to fall into an inifinite loop based on the boolean condition.
2 - I would like to confirm if my apprach of breaking out of the inifite loop is correct?
Thanks for any suggestions
I got the following questions as part of a basic interview test and was wondering with the second question where I'm going wrong.
Here are the questions:
QST 1: Write a function to print out user entry?
ANSWER:
QST 2: Write a function to continuously loop through the user-entered text and upon entry of “exit” by user the infinite loop exits?
ANSWER:
Basically I've got the following issues:
1 - The while loop doesnt seem to fall into an inifinite loop based on the boolean condition.
2 - I would like to confirm if my apprach of breaking out of the inifite loop is correct?
Thanks for any suggestions