Computer Science, asked by ankitkr6164365, 6 months ago

Write the syntax of the foll following:
(a) if...elif.. else' statement
Ans= Syntax : if( test condition 1 ) : statement (s);
elif ( test condition 2 ) : statement (s) ;
......
else :
statement ( s) ;
(b) Decision making with logical operators

Ans=Syntax
if (( condition 1) ( and/or) (condition 2)) : statement 1;
else :
statement2;

Answers

Answered by akanshagarwal2005
2

Answer:

If-Else Statement

This statement comes in when the If condition is not met. The If-Else statement provides and If statement and an Else statement.

Basic Syntax:

If expression

statement

else

statement

Similar questions