Ok so I am new to python and trying to learn how to code. I ran into an issue today that I don't understand. So this code executes as expected and prints the largest of the three numbers no matter what position the largest number is.
if num1 >= num2 and num3:
print(num1, 'Is the greatest number!')
elif num2 >= num3 and num1:
print(num2, 'Is the greatest number!')
else:
print(num3, 'Is the greatest number')
But if i change the elif statement to this:
elif num2 >= num1 and num3:
print(num2, 'Is the greatest number!')
Even if num3 is the largest the else statement will not execute and it will display the larger number of num1 or num2.