7-
You are creating an application which requires the user to input their password for logging into an account. Input is accepted using the input() function. What is the most appropriate approach to writing the code for type conversion of the input value and why?
Convert to str, because we don't want the program to crash if the user inputs a number.
Convert to float, since the input is a "floating" (non-permanent) value.
Convert to float, since int only supports whole numbers.
No type conversion necessary, since the Python interpreter will determine the best type for the value implicitly.
Convert to int, since the input is an "intermediate" value.
No type conversion necessary, since the input will already be the appropriate type for text (str).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here