Computer Science, asked by jitendrakumar44793, 3 months ago

Write the syntax of the ' if' statement ​

Answers

Answered by Anonymous
51

Answer:

Syntax. In both forms of the if statement, the expressions, which can have any value except a structure, are evaluated, including all side effects. In the first form of the syntax, if expression is true (nonzero), statement is executed. If expression is false, statement is ignored.

❥︎༄hope it helps


Anonymous: han
Anonymous: ur intro?
Arnadeep11: My full name is Arnadeep Saha..... what is yours
Anonymous: Sayee
Anonymous: From Maharashtra
Anonymous: 8th
Arnadeep11: Im in 9th
Arnadeep11: hey can we be friends
Arnadeep11: ????????????
Anonymous: yaa sure☺
Answered by allysia
4

Answer:

For python it goes like:

if condition 1:

      statement 1

elif condition 2:

      statement 2

elif condition 3:

      statement 3

.

.

.

elif condition n:

      statement n

else:

      statement m

An example is as followed below:

\\\tt if \ rating==5:\\{\qquad print("Nice \ one")}\\\tt elif \ rating<5 \ and \ rating >3:\\{\qquad print("Good \ enough")}\\\tt else:\\{\qquad print("Try \ agin")}

Similar questions