-2

I'm beginner in python but I don't understand a thing. This is the Code:

a = input("Insert first number ")
b = input("Insert second number ")
c = input("Insert third number ")
print("Max number is", max(a, b, c))

For example, I write at prompt:

Insert first number 12
Insert second number 34
Insert third number 100
Max number is 34

I don't understand! Please answer me!

1 Answers1

1

Input returns string and strings are compared lexicographically. You should cast all input results to int, to get numbers.

Mateusz
  • 131
  • 3