📜  如何在python代码示例中获得最大输入数

📅  最后修改于: 2022-03-11 14:47:10.631000             🧑  作者: Mango

代码示例1
#program to get the highest number of an input

#take input from the user
value1=input(int("Enter the Value 1"))
value2=input(int("Enter the Value 2"))
value3=input(int("Enter the Value 3"))

#now compare the values
if (value1>value2) and (value1>value3):
  largest=value1
elif (value2>value1) and (value2>value3):
  largest=value2
else:
  largest=value3

#print the largest value
print("The largest value is",largest)