Already Passed
What will the following code output?
```
x=7
if x > 5:
print("Greater than 5")
else:
print("Less than or equal to 5")
```
✔✔ Greater than 5
Less than or equal to 5
Which of the following is a valid `if` statement in Python?
✔✔ `if x == 10:`
`if x = 10:`
`if x > 10`
`if x is 10:`
1
,What does the `else` clause do in an `if-else` structure?
Executes if the `if` condition is true
✔✔ Executes if the `if` condition is false
Runs regardless of the condition
Does not execute any code
What will the following code output?
```
x = 10
if x < 5:
print("Small")
elif x == 10:
print("Equal to 10")
else:
print("Large")
```
Equal to 10
2
, ✔✔ Equal to 10
Small
Large
What does the `elif` keyword allow you to do?
✔✔ Test additional conditions after the initial `if` condition
Execute code when the `if` condition is true
Avoid using `else` in decision structures
Check for `True` conditions only
Which of the following statements correctly checks if a number is even?
✔✔ `if number % 2 == 0:`
`if number % 2 != 0:`
`if number // 2 == 0:`
`if number == 2:`
What will the following code output?
```
3