it would seem we just need to preface each one with the appropriate condition( )so that it is executed only in the proper situation let' consider the first possibilitythat is the largest to determine that is actually the largestwe just need to check that it is at least as large as the other two here is first attemptif > > max your first concern here should be whether this statement is syntactically correct the condition > > does not match the template for conditions shown above most computer languages would not accept this as valid expression it turns out that python does allow this compound conditionand it behaves exactly like the mathematical relations > > that isthe condition is true when is at least as large as and is at least as large as sofortunatelypython has no problem with this condition whenever you write decisionyou should ask yourself two crucial questions firstwhen the condition is trueare you absolutely certain that executing the body of the decision is the right action to takein this casethe condition clearly states that is at least as large as and so assigning its value to max should be correct always pay particular attention to borderline values notice that our condition includes equal as well as greater we should convince ourselves that this is correct suppose that and are all the samethis condition will return true that' ok because it doesn' matter which we choosethe first is at least as big as the othersand hencethe max the second question to ask is the converse of the first are we certain that this condition is true in all cases where is the maxunfortunatelyour condition does not meet this test suppose the values are and clearlyx is the largestbut our condition returns false since the relationship > > does not hold we need to fix this we want to ensure that is the largestbut we don' care about the relative ordering of and what we really need is two separate tests to determine that > and that > python allows us to test multiple conditions like this by combining them with the keyword and we'll discuss the exact semantics of and in intuitivelythe following condition seems to be what we are looking forif > and > max is greater than each of the others to complete the programwe just need to implement analogous tests for the other possibilities if > and > max elif > and > max elsemax