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...


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?






a.

Convert to str, because we don't want the program to crash if the user inputs a number.






b.

Convert to float, since the input is a "floating" (non-permanent) value.






c.

Convert to float, since int only supports whole numbers.






d.

No type conversion necessary, since the Python interpreter will determine the best type for the value implicitly.






e.

Convert to int, since the input is an "intermediate" value.






f.

No type conversion necessary, since the input will already be the appropriate type for text (str).








Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here