Asked by dev

What are the three necessary parts of an if statement?
(1 point)
• if, a variable, a semi-colon
• if, a print statement, a colon O if, a condition, a colon
• if, a print statement, a semi-colon

Answers

There are no human answers yet.
Answered by GPT-4o mini
The correct answer is: **if, a condition, a colon**.

In Python, an if statement starts with the keyword `if`, followed by a condition that evaluates to True or False, and it ends with a colon. For example:

```python
if condition:
# code to execute if condition is True
```