set max to be the first value max eval(input("enter number >")now compare the - successive values for in range( - ) eval(input("enter number >")if maxmax print("the largest value is"maxmain(this code uses decision nested inside of loop to get the job done on each iteration of the loopmax contains the largest value seen so far strategy use python before leaving this problemi really should mention that none of the algorithm development we have so painstakingly pursued was necessary python actually has built-in function called max that returns the largest of its parameters here is the simplest version of our programdef main() eval(input("please enter three values")print("the largest value is"max( )of coursethis version didn' require any algorithm development at allwhich rather defeats the point of the exercisesometimes python is just too simple for our own good some lessons the max of three problem is not particularly earth shatteringbut the attempt to solve this problem has illustrated some important ideas in algorithm and program design there is more than one way to do it for any non-trivial computing problemthere are many ways to approach the problem while this may seem obviousmany beginning programmers do not really take this point to heart what does this mean for youdon' rush to code up the first idea that pops into your head think about your designask yourself if there is better way to approach the problem once you have written the codeask yourself again if there might be better way your first task is to find correct algorithm after thatstrive for claritysimplicityefficiencyscalabilityand elegance good algorithms and programs are like poems of logic they are pleasure to read and maintain