While entering the negative numbers as below, I want to extract the max value. I expect that value to be -0.123, but the actual value (in Python 3.6.0 shell) is -45.02. Here is my code:
x=input("Enter value of X :")
y=input("Enter value of y :")
Z=input("Enter value of Z :")
print("Display of max value")
print(max(x,y,Z))
input("Please press enter to exit")
And its output:
Enter value of X :-45.02
Enter value of y :-0.123
Enter value of Z :-1.136
Display of max value
-45.02
Can you help me figure out that result?
floats before taking themax.