Input is always text
Whatever a user types arrives as text. Converting is not optional when you need a number, and it is where a crash on input usually comes from.
One question per function
A function that asks one question and returns one answer is easy to reuse. Loops and retries belong to the caller, not the question.