Sep-26-2020, 10:14 PM
In Python 2.7 the input command evaluated what you typed. If you typed 3.14 it would evaluate the string '3.14. and return the float number 3.14. If you type 42 it would evaluate the string '42' and return an integer number 42. If you typed a it would look for a variable named a and return the value of a.
In Python 3 the input command stopped doing the evaluation part and left that to be programmed. In Python 3 if you input 3.14 it remains the string 3.14 until you do something to convert the string to a number.
In Python 3 the input command stopped doing the evaluation part and left that to be programmed. In Python 3 if you input 3.14 it remains the string 3.14 until you do something to convert the string to a number.