max max max max max figure flowchart of sequential approach to the max of three problem if maxmax if maxmax if maxmax it should not be surprising that the last solution scales to larger problemswe invented the algorithm by explicitly considering how to solve more complex problem in factyou can see that the code is very repetitive we can easily write program that allows the user to find the largest of numbers by folding our algorithm into loop rather than having separate variables for etc we can just get the values one at time and keep reusing single variable each timewe compare the newest against the current value of max to see if it is larger programmaxn py finds the maximum of series of numbers def main() eval(input("how many numbers are there")