.. ot-exercise:: python.exercises.legacy.max_numbers_function :dependencies: python.exercises.legacy.max_numbers, python.exercises.legacy.for_primeness, python.basics.python_0270_functions .. include:: Exercise: Determine Maximum of Two Numbers (Function) ===================================================== .. contents:: :local: Modify the program from :doc:`max_numbers` as follows. * Push the code that calculates the maximum into a function. * The function takes the numbers-to-compare as parameters. * The function returns the calculated maximum. * The rest of the program remains intact; only the function is called rather than implementing the comparison inline, top level. Dependencies ------------ .. ot-graph:: :entries: python.exercises.legacy.max_numbers_function