English

Write a note on if..else structure.

Advertisements

Question

Write a note on if..else structure.

Short/Brief Note
Advertisements

Solution

The if-else statement provides control to check the true block as well as the false block. Following is the syntax of the if-else statement.

Syntax:

if:
statements – block 1
else:
statements – block 2

shaalaa.com
Control Structure
  Is there an error in this question or solution?
Chapter 6: Control Structures - Evaluation [Page 88]
Advertisements
Share
Notifications



      Forgot password?
Use app×