Write the syntax of an if…..else statement in Python programming language
Answers
Answered by
6
Syntax of if...else
The if..else statement evaluates test expression and will execute body of if only when test condition is True . If the condition is False , body of else is executed. Indentation is used to separate the blocks. Hope it helps
Answered by
4
The if else statement is used to check either of the two conditions and executes one block of statements depending on the result of the test operation.
Explanation:
- Syntax for the if else statement is:
- If ( check condition)
- {
- Block 1 statements executed
- }
- else
- {
- Block 2 statements executed
- }
- The if statement checks the condition and then executes the statements if condition is true and if condition is false, the statements under else block is executed.
To know more:
1) What is if else statement??????
https://brainly.in/question/12094098.
2) Difference between If else If and switch case
https://brainly.in/question/6025694
Similar questions
CBSE BOARD X,
5 months ago
Science,
5 months ago
Computer Science,
11 months ago
Computer Science,
11 months ago