.. ot-exercise:: python.exercises.legacy.max_numbers :dependencies: python.exercises.legacy.mixed_list_executable, python.basics.python_0140_variables, python.basics.python_0170_if, python.basics.python_0139_commandline_argv .. include:: Exercise: Determine Maximum of Two Numbers ========================================== .. sidebar:: **See also** * :doc:`/trainings/material/soup/python/basics/python_0139_commandline_argv/topic` * :doc:`/trainings/material/soup/python/basics/python_0150_datatypes_overview/topic` ("Datatype Conversions") * :doc:`/trainings/material/soup/python/basics/python_0170_if/topic` Write a program that * Takes two numbers from the commandline. *Remember*: commandline arguments can only be strings, so those have to be converted to numbers. * Determines the maximum of the numbers. * Outputs the maximum. .. code-block:: console $ python maximum.py 3 4 4 $ python maximum.py 200 99 200 Dependencies ------------ .. ot-graph:: :entries: python.exercises.legacy.max_numbers