User Input and Type Casting in Python