Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left

03 D 19 H : 22 M : 34 S   Apply Now

Foundations of Python

72 / 134

Visualize the Conditional

We can better visualize the the conditional by using the flowchart for this code,

 if x == y:
    print('x and y are equal')
else:
    if x < y:
        print('x is less than y')
    else:
        print('x is greater than y')

Visual description of conditional

The outer conditional has two branches. The second branch contains another if statement, which has two branches of its own. Those two branches are both simple statements, although they could have been conditional statements as well.


No hints are availble for this assesment

Answer is not availble for this assesment

Please login to comment

0 Comments

There is 1 new comment.