when handle the case of double root when handle the case of two distinct roots one way to code this algorithm is to use two if-else statements the body of an if or else clause can contain any legal python statementsincluding other if or if-else statements putting one compound statement inside of another is called nesting here' fragment of code that uses nesting to achieve three-way decisionif discrim print("equation has no real roots"elseif discrim = root - ( aprint("there is double root at"rootelsedo stuff for two roots if you trace through this code carefullyyou will see that there are exactly three possible paths the sequencing is determined by the value of discrim flowchart of this solution is shown in figure you can see that the top-level structure is just an if-else (treat the dashed box as one big statement the dashed box contains the second if-else nested comfortably inside the else part of the top-level decision yes discrim no print "no rootsyes do double root discrim = no do unique roots figure three-way decision for quadratic solver using nested if-else once againwe have working solutionbut the implementation doesn' feel quite right we have finessed three-way decision by using two two-way decisions the resulting code does not