flowchart for nested if statement in python