created while loop for prompt

created while loop for prompt