79600619

Date: 2025-04-30 15:25:07
Score: 1
Natty:
Report link

Very late, but another way to approach this problem is to use lists and the max() function.

Once the three numbers have been entered, initialize a list to empty. Examine each number, and if it is odd, add it to the list. If the list is still empty at the end of this, then none of the numbers are odd. If the list is not empty, use the max() function on it to get the largest number (ie., let it do all the necessary comparisons for you).

There might still be some things to watch out for, such as negative numbers, non-integer numbers, or more than one number having the same value. The conditions of the problem as outlined do not say if any of these are possible.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Anton Treuenfels