1. Which of the following is the syntax for if statement?
a. if expression: statement(s)
b. if expression: loop(s)
c. if expression: statement(s) else: statement(s)
d. if expression: loop(s) else: loop(s)
Answers
Answered by
6
Answer:
plzzzzzzzz follow me and give five points
Answered by
0
Option (A) is correct.
"if expression: statement(s)" is the syntax for if statement.
About Syntax of IF statement :
- In Python, the if Statement is used to make judgments. It consists of a piece of program that only runs when the condition of the if statement is true.
- If the condition is false, an else statement is executed, which contains a statement matching the else condition.
- The if statement from Python is one of the most commonly used conditionals in computer languages.
- It determines whether certain assertions must always be executed or not. It checks for a specific condition, but if it is true, it executes the statement contained in the " if " block; otherwise, it does not.
Similar questions