nested if statement in python flowchart