2 points:
- Your program shadows an inbuilt function, you redefine
max, which is defined by Python itself, this is a very bad thing to do, and should not be in the tutorial. - This can be done in one line with said inbuilt function, max
max(1,12)will return12in the Python console, so you could just have
max(FirstNumber, SecondNumber)
Things to take away from this:
- Do not shadow or any decent programmer will cry their guts out.
- Keep It Simple Stupid (KISS), and use inbuilt functions.
RE: 5.12 Maximum of Two Values - Python