I just started learning python. I have some experience with C++ from school. The problem is to write code that prints the largest odd number from user input and to print relevant feedback if there isn't any odd number. What is wrong with this code and are there better ways to solve this problem?
#To print the largest odd number
x = input ("Enter first number: ")
y = input ("Enter second number: ")
z = input ("Enter third number: ")
if x % 2 == 0 and y % 2 == 0 and z % 2 == 0:
print ("There are no odd numbers")
if x % 2 != 0 and x > y and x > z:
print (x, " is the largest odd number")
if y % 2 != 0 and y > x and y > z:
print (y, " is the largest odd number")
if z % 2 != 0 and z > x and z > y:
print (z, " is the largest odd number")
elif x == y == z:
print ("All the numbers have the same value")