created a prompt and validated while loops

created a prompt and validated while loops