I am completely new to programming. However, I just wanna write a simple bit of code on Python, that allows me to input any data and the type of the data is relayed or 'printed' back at me.
The current script I have is:
x = input()
print(x)
print(type(x))
However, regardless of i input a string, integer or float it will always print string? Any suggestions?
float('3.14')which returns a float-value.inputfunction to return anything but a string (in Python 3)? From its documentation: The function (..) reads a line from input, converts it to a string (stripping a trailing newline) ....